projects
/
lilass.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
let the GUI module directly return a ScreenSetup instance
[lilass.git]
/
gui.py
diff --git
a/gui.py
b/gui.py
index edb9b2b9a8086ceeeddb794986891cb6599df1fb..2e5d47673f05397e46788dcf2c67d7869f7a5a61 100644
(file)
--- a/
gui.py
+++ b/
gui.py
@@
-18,8
+18,13
@@
# This file bstracts GUI stuff away, so that the actual dsl.py does not have to deal with it
import sys
from PyQt4 import QtGui
# This file bstracts GUI stuff away, so that the actual dsl.py does not have to deal with it
import sys
from PyQt4 import QtGui
+from qt_dialogue import PositionSelection
app = QtGui.QApplication(sys.argv)
def error(message):
app = QtGui.QApplication(sys.argv)
def error(message):
+ '''Displays a fatal error to the user'''
QtGui.QMessageBox.critical(None, 'Fatal error', message)
QtGui.QMessageBox.critical(None, 'Fatal error', message)
- raise Exception(message)
+
+def setup(internalResolutions, externalResolutions):
+ '''Returns a ScreenSetup instance, or None if the user canceled'''
+ return PositionSelection(internalResolutions, externalResolutions).run()