Fixed an issue in Startup.py causing the tray starter to fail. 5_2_x

Sun, 06 May 2012 11:21:45 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 06 May 2012 11:21:45 +0200
branch
5_2_x
changeset 1859
817828de35f0
parent 1847
ed220d11ee1e
child 1860
d85690bc1e77

Fixed an issue in Startup.py causing the tray starter to fail.

Utilities/Startup.py file | annotate | diff | comparison | revisions
eric5_tray.py file | annotate | diff | comparison | revisions
diff -r ed220d11ee1e -r 817828de35f0 Utilities/Startup.py
--- a/Utilities/Startup.py	Sat May 05 19:23:18 2012 +0200
+++ b/Utilities/Startup.py	Sun May 06 11:21:45 2012 +0200
@@ -203,7 +203,7 @@
 
 
 def simpleAppStartup(argv, appinfo, mwFactory, quitOnLastWindowClosed=True,
-    app=None):
+    app=None, raiseIt=True):
     """
     Module function to start up an application that doesn't need a specialized start up.
     
@@ -220,6 +220,7 @@
     @keyparam quitOnLastWindowClosed flag indicating to quit the application,
         if the last window was closed (boolean)
     @keyparam app reference to the application object (QApplication or None)
+    @keyparam raiseIt flag indicating to raise the generated application window (boolean)
     """
     handleArgs(argv, appinfo)
     if app is None:
@@ -243,6 +244,7 @@
     if quitOnLastWindowClosed:
         app.lastWindowClosed.connect(app.quit)
     w.show()
-    w.raise_()
+    if raiseIt:
+        w.raise_()
     
     return app.exec_()
diff -r ed220d11ee1e -r 817828de35f0 eric5_tray.py
--- a/eric5_tray.py	Sat May 05 19:23:18 2012 +0200
+++ b/eric5_tray.py	Sun May 06 11:21:45 2012 +0200
@@ -52,7 +52,8 @@
     res = Startup.simpleAppStartup(sys.argv,
                                    appinfo,
                                    createMainWidget,
-                                   quitOnLastWindowClosed=False)
+                                   quitOnLastWindowClosed=False,
+                                   raiseIt=False)
     sys.exit(res)
 
 if __name__ == '__main__':

eric ide

mercurial