Author: johannes
Date: 2007-05-29 09:38:29 -0500 (Tue, 29 May 2007)
New Revision: 9641
Modified:
trunk/gnue-forms/src/uidrivers/wx26/widgets/menuitem.py
Log:
Using the mainform for binding the menu event makes Quit work again
Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/menuitem.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/menuitem.py 2007-05-29 14:01:41 UTC (rev 9640)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/menuitem.py 2007-05-29 14:38:29 UTC (rev 9641)
@@ -66,14 +66,11 @@
# wx.ID_EXIT and wx.ID_PREFERENCES will get rearranged into the
# Application menu (according to Apples HIG). On all other
# platforms it does nothing special with these menu items.
- if 'wxMac' in wx.PlatformInfo:
- if self._gfObject.name == '__show_about__':
- mid = wx.ID_ABOUT
+ if self._gfObject.name == '__show_about__':
+ mid = wx.ID_ABOUT
- elif self._gfObject.name == '__close__':
- mid = wx.ID_EXIT
- else:
- mid = wx.ID_ANY
+ elif self._gfObject.name == '__close__':
+ mid = wx.ID_EXIT
else:
mid = wx.ID_ANY
@@ -84,7 +81,7 @@
image = wx.Image(icon_file, wx.BITMAP_TYPE_PNG)
widget.SetBitmap(image.ConvertToBitmap())
- wx.EVT_MENU(wx.GetApp(), widget.GetId(), self.__on_menu)
+ self._uiForm.main_window.Bind(wx.EVT_MENU, self.__on_menu, widget)
event.container.AppendItem(widget)
else:
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.