commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r9471 - trunk/gnue-forms/src/uidrivers/wx26/widgets


From: reinhard
Subject: [gnue] r9471 - trunk/gnue-forms/src/uidrivers/wx26/widgets
Date: Mon, 9 Apr 2007 16:02:51 -0500 (CDT)

Author: reinhard
Date: 2007-04-09 16:02:51 -0500 (Mon, 09 Apr 2007)
New Revision: 9471

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/widgets/_base.py
Log:
User smarter algorithm to determine whether a member of a (v|h)box needs a
separate label or not. This fixes wrong behaviour for checkboxes in hboxes.


Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/_base.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/_base.py        2007-04-09 
20:56:18 UTC (rev 9470)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/_base.py        2007-04-09 
21:02:51 UTC (rev 9471)
@@ -321,6 +321,9 @@
         # parent for container-panel of the box (as well as the StaticBoxSizer
         # if a box-label is requested).
         self._container = wx.Panel(parent, -1)
+        # FIXME: Why do we need this sizer? Things seem to work the same at
+        # least on gtk2 if we assign the GridBagSizer directly to
+        # self._container.
         self._container.SetSizer(wx.BoxSizer(wx.VERTICAL))
 
         # If the has a block assigned we can bind the mouse wheel event to
@@ -376,15 +379,11 @@
 
     def __use_second_one(self):
 
-        result = False
-
         for item in self._children:
-            if (item._gfObject._type in ['GFEntry', 'GFImage']) and \
-                    item._gfObject.label:
-                result = True
-                break
+            if item._gfObject.has_label:
+                return True
 
-        return result
+        return False
 
     # -------------------------------------------------------------------------
     # Event-Handler





reply via email to

[Prev in Thread] Current Thread [Next in Thread]