let the GUI module directly return a ScreenSetup instance
[lilass.git] / gui.py
diff --git a/gui.py b/gui.py
index a85f2d52bcb8bd57abe07eb0e303f4a06c5f02aa..2e5d47673f05397e46788dcf2c67d7869f7a5a61 100644 (file)
--- a/gui.py
+++ b/gui.py
 # 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):
+       '''Displays a fatal error to the user'''
        QtGui.QMessageBox.critical(None, 'Fatal error', message)
+
+def setup(internalResolutions, externalResolutions):
+       '''Returns a ScreenSetup instance, or None if the user canceled'''
+       return PositionSelection(internalResolutions, externalResolutions).run()