UI/UserInterface.py

branch
Py2 comp.
changeset 3056
9986ec0e559a
parent 2847
1843ef6e2656
parent 2933
ada56f070ef4
child 3057
10516539f238
--- a/UI/UserInterface.py	Sun Sep 08 19:04:07 2013 +0200
+++ b/UI/UserInterface.py	Tue Oct 15 22:03:54 2013 +0200
@@ -239,8 +239,6 @@
         
         # now setup the connections
         splash.showMessage(self.trUtf8("Setting up connections..."))
-        app.focusChanged.connect(
-            self.viewmanager.appFocusChanged)
         self.browser.sourceFile[str].connect(
             self.viewmanager.openSourceFile)
         self.browser.sourceFile[str, int].connect(
@@ -453,7 +451,10 @@
         splash.showMessage(self.trUtf8("Initializing Statusbar..."))
         self.__initStatusbar()
         
-        # Initialise the instance variables.
+        # connect the appFocusChanged signal after all actions are ready
+        app.focusChanged.connect(self.viewmanager.appFocusChanged)
+        
+        # Initialize the instance variables.
         self.currentProg = None
         self.isProg = False
         self.utEditorOpen = False
@@ -1012,7 +1013,19 @@
 
         for arg in args:
             # handle a request to start with last session
-            if arg == '--start-session':
+            if arg == '--start-file':
+                self.__openOnStartup("File")
+                # ignore all further arguments
+                return
+            elif arg == '--start-multi':
+                self.__openOnStartup("MultiProject")
+                # ignore all further arguments
+                return
+            elif arg == '--start-project':
+                self.__openOnStartup("Project")
+                # ignore all further arguments
+                return
+            elif arg == '--start-session':
                 self.__openOnStartup("Session")
                 # ignore all further arguments
                 return

eric ide

mercurial