commit-gnue
[Top][All Lists]
Advanced

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

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


From: reinhard
Subject: [gnue] r9446 - trunk/gnue-forms/src/uidrivers/wx26/widgets
Date: Mon, 19 Mar 2007 10:06:45 -0500 (CDT)

Author: reinhard
Date: 2007-03-19 10:06:45 -0500 (Mon, 19 Mar 2007)
New Revision: 9446

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/widgets/toolbutton.py
Log:
Further fix for suppressed toolbar.


Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/toolbutton.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/toolbutton.py   2007-03-18 
19:02:07 UTC (rev 9445)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/toolbutton.py   2007-03-19 
15:06:45 UTC (rev 9446)
@@ -50,29 +50,29 @@
         description = self._gfObject.description
         check = (self._gfObject.action_off is not None)
 
-        if event.container is None:
-            # TOOLBAR:SUPPRESS was set
-            return
+        if event.container is not None:
+            if label is not None:
+                if check:
+                    kind = wx.ITEM_CHECK
+                else:
+                    kind = wx.ITEM_NORMAL
 
-        if label is not None:
-            if check:
-                kind = wx.ITEM_CHECK
-            else:
-                kind = wx.ITEM_NORMAL
+                if icon_file:
+                    image = wx.Image(icon_file, wx.BITMAP_TYPE_PNG)
+                else:
+                    image = None
 
-            if icon_file:
-                image = wx.Image(icon_file, wx.BITMAP_TYPE_PNG)
+                widget = event.container.AddLabelTool(wx.ID_ANY, label,
+                        image.ConvertToBitmap(), kind=kind, shortHelp=label,
+                        longHelp=(description or u""))
+
+                wx.EVT_TOOL(event.container, widget.GetId(), self.__on_tool)
             else:
-                image = None
-
-            widget = event.container.AddLabelTool(wx.ID_ANY, label,
-                    image.ConvertToBitmap(), kind=kind, shortHelp=label,
-                    longHelp=(description or u""))
-
-            wx.EVT_TOOL(event.container, widget.GetId(), self.__on_tool)
+                widget = None
+                event.container.AddSeparator()
         else:
+            # TOOLBAR:SUPPRESS was set
             widget = None
-            event.container.AddSeparator()
 
         self.__widget = widget
 





reply via email to

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