Author: johannes
Date: 2006-10-19 08:07:33 -0500 (Thu, 19 Oct 2006)
New Revision: 8872
Modified:
trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
Log:
Remove parent-lookup for wxMac
Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py 2006-10-19
12:49:37 UTC (rev 8871)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py 2006-10-19
13:07:33 UTC (rev 8872)
@@ -205,6 +205,8 @@
if self.in_grid:
label = wx.StaticText(parent, -1)
+ # Bind the LEFT_UP event to both, the panel and the label widget,
+ # so clicking an empty cell works too
parent.Bind(wx.EVT_LEFT_UP, self.__on_label_click)
label.Bind(wx.EVT_LEFT_UP, self.__on_label_click)
@@ -225,20 +227,16 @@
label = event.GetEventObject()
for item in self.widgets:
if isinstance(label, wx.Panel):
+ # An empty cell has been clicked
other = item.GetParent()
else:
other = item._gnue_label_
if other == label:
- lookup = item
- if 'wxMac' in wx.PlatformInfo \
- and self._gfObject.style == 'dropdown':
- lookup = lookup.GetParent()
-
- if lookup.IsEnabled():
+ if item.IsEnabled():
# This replaces the label with the actual entry and sets
# the focus on the entry
- self._ui_set_focus_(self.widgets.index(lookup))
+ self._ui_set_focus_(self.widgets.index(item))
break
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue