[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8994 - in trunk/gnue-forms/src/uidrivers/wx26: . widgets
From: |
johannes |
Subject: |
[gnue] r8994 - in trunk/gnue-forms/src/uidrivers/wx26: . widgets |
Date: |
Wed, 8 Nov 2006 03:35:29 -0600 (CST) |
Author: johannes
Date: 2006-11-08 03:35:29 -0600 (Wed, 08 Nov 2006)
New Revision: 8994
Modified:
trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
Log:
Exit the main loop even if a dialog apeared within the close-event
Modified: trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py 2006-11-07 19:50:28 UTC
(rev 8993)
+++ trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py 2006-11-08 09:35:29 UTC
(rev 8994)
@@ -237,10 +237,4 @@
for child in self._children:
child.main_window.Close(True)
- # FIXME (issue132): Closing the last form should end the application main
- # loop automatically. However, this does not work in cases where a dialog
- # box is shown while closing (asking whether to save changes or not), so we
- # end the main loop manually.
- wx.GetApp().ExitMainLoop()
-
assert gLeave(6)
Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py 2006-11-07 19:50:28 UTC
(rev 8993)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py 2006-11-08 09:35:29 UTC
(rev 8994)
@@ -236,7 +236,10 @@
self._uiDriver.hide_splash()
self.main_window.Raise()
self.sizing_enabled = True
- self.main_window.ShowModal()
+ if isinstance(self.main_window, wx.Dialog):
+ self.main_window.ShowModal()
+ else:
+ self.main_window.Show()
# -------------------------------------------------------------------------
@@ -286,6 +289,10 @@
# this event, meaning the form is being destroyed. For some reason,
# this doesn't work, so we destroy the form manually.
# event.Skip()
+ #
+ # We have to call Show() here to make sure the main loop can exit
+ # cleanly. This workaround is obsolete with wx2.7+
+ event.GetEventObject().Show()
event.GetEventObject().Destroy()
# -------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8994 - in trunk/gnue-forms/src/uidrivers/wx26: . widgets,
johannes <=