commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r8585 - in branches/forms-0.5/src/uidrivers/wx26: . widgets


From: johannes
Subject: [gnue] r8585 - in branches/forms-0.5/src/uidrivers/wx26: . widgets
Date: Tue, 22 Aug 2006 03:50:42 -0500 (CDT)

Author: johannes
Date: 2006-08-22 03:50:41 -0500 (Tue, 22 Aug 2006)
New Revision: 8585

Modified:
   branches/forms-0.5/src/uidrivers/wx26/UIdriver.py
   branches/forms-0.5/src/uidrivers/wx26/widgets/form.py
Log:
Hide the splash screen outside the mainloop


Modified: branches/forms-0.5/src/uidrivers/wx26/UIdriver.py
===================================================================
--- branches/forms-0.5/src/uidrivers/wx26/UIdriver.py   2006-08-22 08:48:43 UTC 
(rev 8584)
+++ branches/forms-0.5/src/uidrivers/wx26/UIdriver.py   2006-08-22 08:50:41 UTC 
(rev 8585)
@@ -168,6 +168,19 @@
 
 
   # ---------------------------------------------------------------------------
+  # Hide the splash screen
+  # ---------------------------------------------------------------------------
+
+  def hide_splash(self):
+      """
+      Hide the Splash-Screen (if it is visible).
+      """
+
+      if self.__splash is not None:
+          self.__splash.Close ()
+
+
+  # ---------------------------------------------------------------------------
   # Start the application's main loop
   # ---------------------------------------------------------------------------
 
@@ -178,13 +191,13 @@
 
     assert gEnter (6)
 
-    if self.__splash is not None:
-      self.__splash.Close ()
+    # Main loop might already be running if this has been called with runForm()
+    if not self.app.IsMainLoopRunning():
+        self.app.MainLoop ()
 
-    self.app.MainLoop ()
-
     assert gLeave (6)
 
+
   # ---------------------------------------------------------------------------
   # Clipboard routines
   # ---------------------------------------------------------------------------

Modified: branches/forms-0.5/src/uidrivers/wx26/widgets/form.py
===================================================================
--- branches/forms-0.5/src/uidrivers/wx26/widgets/form.py       2006-08-22 
08:48:43 UTC (rev 8584)
+++ branches/forms-0.5/src/uidrivers/wx26/widgets/form.py       2006-08-22 
08:50:41 UTC (rev 8585)
@@ -155,6 +155,7 @@
 
   def show (self):
 
+    self._uiDriver.hide_splash()
     self.mainWindow.Raise ()
     self.mainWindow.Show ()
 
@@ -165,6 +166,7 @@
 
   def showModal (self):
 
+    self._uiDriver.hide_splash()
     self.mainWindow.Raise ()
 
     # FIXME: this is a really dirty workaround. Although the focus is set





reply via email to

[Prev in Thread] Current Thread [Next in Thread]