Merge pull request #4 from ConnyOnny/master
[lilass.git] / gui.py
diff --git a/gui.py b/gui.py
index 16224107e429824d6469be35c5c8610138499dc0..4847668630baea6c0642a1eac74ea47e5ea32f30 100644 (file)
--- a/gui.py
+++ b/gui.py
@@ -16,7 +16,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 # This file abstracts GUI stuff away, so that the actual dsl.py does not have to deal with it
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 # This file abstracts GUI stuff away, so that the actual dsl.py does not have to deal with it
-import sys
 
 '''
 This module implements two functions:
 
 '''
 This module implements two functions:
@@ -29,34 +28,12 @@ def setup(internalResolutions, externalResolutions):
     The user should be asked about his display setup preferences.
     The function returns None if the user cancelled, and an instance of dsl.ScreenSetup otherwise.
 '''
     The user should be asked about his display setup preferences.
     The function returns None if the user cancelled, and an instance of dsl.ScreenSetup otherwise.
 '''
-import subprocess, collections
+import collections
 
 
+from qt_frontend import QtFrontend
 from cli_frontend import CLIFrontend
 from zenity_frontend import ZenityFrontend
 from cli_frontend import CLIFrontend
 from zenity_frontend import ZenityFrontend
-from screen import processOutputIt
 
 
-# Qt frontend
-class QtFrontend:
-    def __init__(self):
-        from PyQt4 import QtGui
-        self.app = QtGui.QApplication(sys.argv)
-        print("Qt loaded")
-    
-    def error(self, message):
-        from PyQt4 import QtGui
-        QtGui.QMessageBox.critical(None, 'Fatal error', message)
-    
-    def setup(self, situation):
-        from qt_dialogue import PositionSelection
-        return PositionSelection(situation).run()
-    
-    @staticmethod
-    def isAvailable():
-        try:
-            import PyQt4
-            return True
-        except ImportError:
-            return False
 
 # list of available frontends
 frontends = collections.OrderedDict()
 
 # list of available frontends
 frontends = collections.OrderedDict()