dabo Commit
Revision 4536
Date: 2008-09-29 15:43:18 -0700 (Mon, 29 Sep 2008)
Author: Johnf
Trac: http://svn.dabodev.com/trac/dabo/changeset/4536

Changed:
U   trunk/dabo/ui/uiwx/dPemMixin.py

Log:
wrapped wx.lib.platebtn on wx.version to fix use with older versions of wxpython

Diff:
Modified: trunk/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPemMixin.py     2008-09-29 22:42:29 UTC (rev 4535)
+++ trunk/dabo/ui/uiwx/dPemMixin.py     2008-09-29 22:43:18 UTC (rev 4536)
@@ -123,7 +123,9 @@
                properties = dictStringify(properties)
 
                # Hacks to fix up various things:
-               import dMenuBar, dMenuItem, dMenu, dSlidePanelControl, 
dToggleButton, dBorderlessButton
+               import dMenuBar, dMenuItem, dMenu, dSlidePanelControl, 
dToggleButton
+               if wx.VERSION >= (2, 8, 8):
+                       import dBorderlessButton
                if isinstance(self, dMenuItem.dMenuItem):
                        # Hack: wx.MenuItem doesn't take a style arg,
                        # and the parent arg is parentMenu.
@@ -145,7 +147,7 @@
                        del self._preInitProperties["style"]
                        # This is needed because these classes require a 
'parent' param.
                        kwargs["parent"] = parent
-               elif isinstance(self, (wx.lib.platebtn.PlateButton)):
+               elif wx.VERSION >= (2, 8, 8) and isinstance(self, 
(wx.lib.platebtn.PlateButton)):
                        self._preInitProperties["id_"] = 
self._preInitProperties["id"]
                        del self._preInitProperties["id"]
                # This is needed when running from a saved design file




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to