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
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue