- QtGui.QMessageBox.critical(None, 'Fatal error', message)
- raise Exception(message)
+ '''Displays a fatal error to the user'''
+ if qt_available:
+ QtGui.QMessageBox.critical(None, 'Fatal error', message)
+ else:
+ subprocess.check_call(["zenity", "--error", "--text="+message])
+
+def setup(internalResolutions, externalResolutions):
+ '''Returns a ScreenSetup instance, or None if the user canceled'''
+ if qt_available:
+ return PositionSelection(internalResolutions, externalResolutions).run()
+ else:
+ return zenity_run(internalResolutions, externalResolutions)