[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/forms/src/uidrivers/wx UIdriver.py
From: |
James Thompson |
Subject: |
gnue/forms/src/uidrivers/wx UIdriver.py |
Date: |
Mon, 04 Nov 2002 10:40:22 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: James Thompson <address@hidden> 02/11/04 10:40:22
Modified files:
forms/src/uidrivers/wx: UIdriver.py
Log message:
Possible fix for the Gdk-ERROR **: BadWindow (invalid Window parameter)
error
Made splashscreen stay on top of form until timeout
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/wx/UIdriver.py.diff?tr1=1.202&tr2=1.203&r1=text&r2=text
Patches:
Index: gnue/forms/src/uidrivers/wx/UIdriver.py
diff -c gnue/forms/src/uidrivers/wx/UIdriver.py:1.202
gnue/forms/src/uidrivers/wx/UIdriver.py:1.203
*** gnue/forms/src/uidrivers/wx/UIdriver.py:1.202 Mon Nov 4 01:02:00 2002
--- gnue/forms/src/uidrivers/wx/UIdriver.py Mon Nov 4 10:40:22 2002
***************
*** 173,179 ****
#
if not self._disableSplash:
self.splash =
SplashScreen(None,bitmapfile=images_dir+gConfig('splashScreenPNG'),
! duration = 4000, callback=self.onCloseSplash,
style=wxSIMPLE_BORDER|wxCENTRE_ON_SCREEN )
swidth,sheight = self.splash.GetSizeTuple()
--- 173,179 ----
#
if not self._disableSplash:
self.splash =
SplashScreen(None,bitmapfile=images_dir+gConfig('splashScreenPNG'),
! duration = 3000, callback=self.onCloseSplash,
style=wxSIMPLE_BORDER|wxCENTRE_ON_SCREEN )
swidth,sheight = self.splash.GetSizeTuple()
***************
*** 332,338 ****
_disabledColour = self.mainWindow.GetBackgroundColour()
self.currentWidget = [self.mainWindow.panel]
! self._wxapp.SetTopWindow(self.mainWindow)
EVT_CLOSE(self.mainWindow,self.closeTrap)
--- 332,338 ----
_disabledColour = self.mainWindow.GetBackgroundColour()
self.currentWidget = [self.mainWindow.panel]
! #self._wxapp.SetTopWindow(self.mainWindow)
EVT_CLOSE(self.mainWindow,self.closeTrap)
***************
*** 363,371 ****
child.Fit()
child = child.GetParent()
self.mainWindow.CenterOnScreen()
self.mainWindow.Show(true)
!
#############################################################################
#
--- 363,375 ----
child.Fit()
child = child.GetParent()
+ self._wxapp.SetTopWindow(self.mainWindow)
self.mainWindow.CenterOnScreen()
self.mainWindow.Show(true)
! # TODO: Do we prefer the splash to stay up on top or autoclose when form
! # TODO: is ready? I raised to top and set the timeout lower.
! self.splash.Raise()
! #self.splash.Close(true)
#############################################################################
#
***************
*** 590,595 ****
--- 594,616 ----
# Called by SplashScreen when timer expires
def onCloseSplash(self):
+ # If the splashscreen has timed out before the form is
+ # ready then go ahead and display what we've got. This
+ # is a desperate attempt to eliminate the vile
+ #
+ # Gdk-ERROR **: BadWindow (invalid Window parameter)
+ # serial 1228 error_code 3 request_code 15 minor_code 0
+ #
+ # on heavily loaded machines. The key line seems to be
+ # wxYield() but I'm leaving the others there because I
+ # can :P The fix works for me all the way down to a
+ # splash duration=1 millisecond
+ #
+ self._wxapp.SetTopWindow(self.mainWindow)
+ self.mainWindow.Show(true)
+ wxYield() # Flush the pending queue to insure something is
+ # there before the splashscreen dies
+
# For some reason, a simple Close() doesn't cooperate with
# the modal login box and all hell breaks loose
self.splash.Show(0)
- gnue/forms/src/uidrivers/wx UIdriver.py,
James Thompson <=
- gnue/forms/src/uidrivers/wx UIdriver.py, James Thompson, 2002/11/04
- gnue/forms/src/uidrivers/wx UIdriver.py, James Thompson, 2002/11/08
- gnue/forms/src/uidrivers/wx UIdriver.py, Jason Cater, 2002/11/09
- gnue/forms/src/uidrivers/wx UIdriver.py, James Thompson, 2002/11/15
- gnue/forms/src/uidrivers/wx UIdriver.py, Jason Cater, 2002/11/22