[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8948 - in trunk/gnue-forms/src: . uidrivers/wx26 uidrivers/wx26/
From: |
reinhard |
Subject: |
[gnue] r8948 - in trunk/gnue-forms/src: . uidrivers/wx26 uidrivers/wx26/widgets |
Date: |
Sun, 29 Oct 2006 09:53:32 -0600 (CST) |
Author: reinhard
Date: 2006-10-29 09:53:31 -0600 (Sun, 29 Oct 2006)
New Revision: 8948
Modified:
trunk/gnue-forms/src/GFForm.py
trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
Log:
Reverted the fix in rev. 8925 because it broke closing forms when more than one
forms are contained in a single GFD.
Instead of that, call ExitMainLoop() manually as a temporary workaround.
Further investigation needed.
issue132 chatting.
Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py 2006-10-29 09:44:44 UTC (rev 8947)
+++ trunk/gnue-forms/src/GFForm.py 2006-10-29 15:53:31 UTC (rev 8948)
@@ -1819,7 +1819,7 @@
# Close this window
# -------------------------------------------------------------------------
- def close(self, from_close_event=False):
+ def close(self):
# FIXME: Changes in the current entry are not yet saved in the field if
# this was caused by a click on the close button of the window,
@@ -1833,11 +1833,8 @@
self.processTrigger('On-Exit')
- # Only perform _ui_close_, if the call does not originate from a
- # wx.CloseEvent
- if not from_close_event:
- if self.uiWidget is not None:
- self.uiWidget._ui_close_()
+ if self.uiWidget is not None:
+ self.uiWidget._ui_close_()
self.__visible = False
Modified: trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py 2006-10-29 09:44:44 UTC
(rev 8947)
+++ trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py 2006-10-29 15:53:31 UTC
(rev 8948)
@@ -183,7 +183,7 @@
def _ui_show_error_(self, message):
if self.__splash:
- self.__splash.Close()
+ self.__splash.Close ()
dialog = wx.MessageDialog(None, message, "GNU Enterprise",
wx.ICON_ERROR | wx.OK)
@@ -224,4 +224,10 @@
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-10-29 09:44:44 UTC
(rev 8947)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py 2006-10-29 15:53:31 UTC
(rev 8948)
@@ -278,11 +278,15 @@
def __on_close(self, event):
if event.CanVeto():
- self._form.close(True)
+ self._form.close()
event.Veto()
else:
self.sizing_enabled = False
- event.Skip()
+ # Actually, event.Skip() should call the standard event handler for
+ # this event, meaning the form is being destroyed. For some reason,
+ # this doesn't work, so we destroy the form manually.
+ # event.Skip()
+ event.GetEventObject().Destroy()
# -------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8948 - in trunk/gnue-forms/src: . uidrivers/wx26 uidrivers/wx26/widgets,
reinhard <=