dabo Commit
Revision 4569
Date: 2008-10-20 06:57:09 -0700 (Mon, 20 Oct 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4569

Changed:
U   trunk/dabo/ui/dialogs/about.py
U   trunk/dabo/ui/uiwx/dSizerMixin.py

Log:
Added a fix to dSizerMixin when setting the Spacing property - sometimes the 
value can come from the edited grid cell in the Property sheet as a string 
instead of an int. I think I fixed the prop sheet, but I left this fix in just 
in case.

When I added a close button to the htmlAbout dialog last week, I also added one 
to the old non-HTML about.py dialog, but never committed it.


Diff:
Modified: trunk/dabo/ui/dialogs/about.py
===================================================================
--- trunk/dabo/ui/dialogs/about.py      2008-10-14 01:32:02 UTC (rev 4568)
+++ trunk/dabo/ui/dialogs/about.py      2008-10-20 13:57:09 UTC (rev 4569)
@@ -50,9 +50,15 @@
                sz.append1x(eg)
 
                # Copy info
-               btnCopy = dabo.ui.dButton(pnlBack, Caption=_("Copy Info"))
-               btnCopy.bindEvent(dEvents.Hit, self.onCopyInfo)
-               sz.append(btnCopy, 0, halign="right")
+               btnCopy = dabo.ui.dButton(pnlBack, Caption=_("Copy Info"),
+                               OnHit=self.onCopyInfo)
+               btnClose = dabo.ui.dButton(pnlBack, Caption=_("OK"),
+                               OnHit=self.onClose)
+               hsz = dabo.ui.dSizer("H")
+               hsz.append(btnCopy)
+               hsz.appendSpacer(20)
+               hsz.append(btnClose)
+               sz.append(hsz, halign="right")
 
                sz.append((0,20))               
 

Modified: trunk/dabo/ui/uiwx/dSizerMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dSizerMixin.py   2008-10-14 01:32:02 UTC (rev 4568)
+++ trunk/dabo/ui/uiwx/dSizerMixin.py   2008-10-20 13:57:09 UTC (rev 4569)
@@ -379,6 +379,8 @@
                elif lowprop == "spacing":
                        if isinstance(val, int):
                                val = (val, val)
+                       elif isinstance(val, basestring):
+                               val = (int(val), int(val))
                        try:
                                ret = itm.SetSpacer(val)
                                ret = True




_______________________________________________
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