dabo Commit
Revision 4836
Date: 2008-12-15 11:56:54 -0800 (Mon, 15 Dec 2008)
Author: Paul
Trac: http://trac.dabodev.com/dabo/changeset/4836

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

Log:
Removed the pre-wx2.7 code that handled skipping a spurious second Activate 
event.


Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py    2008-12-14 18:26:02 UTC (rev 4835)
+++ trunk/dabo/ui/uiwx/dFormMixin.py    2008-12-15 19:56:54 UTC (rev 4836)
@@ -27,10 +27,6 @@
        def __init__(self, preClass, parent=None, properties=None, 
attProperties=None, 
                        src=None, *args, **kwargs):
 
-               # Windows sends two Activate events, and one of them is too 
early.
-               # Skip the first one. Update: apparently on wx27 and above the 
-               # double-activation is no longer an issue.
-               self._skipActivate = (wx.VERSION < (2,7) and 
self.Application.Platform == "Win")
                self._cxnFile = ""
                self._cxnName = ""
                self._connection = None
@@ -163,22 +159,17 @@
        def __onWxActivate(self, evt):
                """ Raise the Dabo Activate or Deactivate appropriately."""
                if bool(evt.GetActive()):
-                       if False and self._skipActivate:
-                               # Skip the first activate (Windows)
-                               self._skipActivate = False
-                       else:
-                               # Restore the saved size and position, which 
can't happen 
-                               # in __init__ because we may not have our name 
yet.
-                               try:
-                                       restoredSP = self.restoredSP
-                               except AttributeError:
-                                       restoredSP = False
-                               if not restoredSP:
-                                       if self.SaveRestorePosition:
-                                               
dabo.ui.callAfter(self.restoreSizeAndPosition)
+                       # Restore the saved size and position, which can't 
happen 
+                       # in __init__ because we may not have our name yet.
+                       try:
+                               restoredSP = self.restoredSP
+                       except AttributeError:
+                               restoredSP = False
+                       if not restoredSP:
+                               if self.SaveRestorePosition:
+                                       
dabo.ui.callAfter(self.restoreSizeAndPosition)
                                
-                               self.raiseEvent(dEvents.Activate, evt)
-                               self._skipActivate = (self.Application.Platform 
== "Win")
+                       self.raiseEvent(dEvents.Activate, evt)
                else:
                        self.raiseEvent(dEvents.Deactivate, evt)
                evt.Skip()




_______________________________________________
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