dabo Commit
Revision 4584
Date: 2008-10-23 11:49:26 -0700 (Thu, 23 Oct 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4584

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

Log:
Worked around an apparent bug with MDI Child Windows on Mac, where calling
Maximize(False) will maximize instead of restore the window.


Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py    2008-10-23 11:32:22 UTC (rev 4583)
+++ trunk/dabo/ui/uiwx/dFormMixin.py    2008-10-23 18:49:26 UTC (rev 4584)
@@ -15,6 +15,15 @@
 
 
 class dFormMixin(pm.dPemMixin):
+       def Maximize(self, maximize=True, *args, **kwargs):
+               # On Mac MDI Child Frames, Maximize(False) erroneously 
maximizes. Not sure
+               # how to restore a maximized frame in this case, but at least 
we can catch
+               # the case where the window isn't maximized already.
+               if self.MDI and sys.platform.startswith("darwin") and not 
maximize \
+                               and not self.IsMaximized():
+                       return
+               super(dFormMixin, self).Maximize(maximize, *args, **kwargs)
+       
        def __init__(self, preClass, parent=None, properties=None, 
attProperties=None, 
                        src=None, *args, **kwargs):
 




_______________________________________________
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