dabo Commit
Revision 4907
Date: 2009-01-05 06:56:52 -0800 (Mon, 05 Jan 2009)
Author: Ed
Trac: http://trac.dabodev.com/changeset/4907

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

Log:
Removed the debug line.

Also, I failed to note in the last commit that I tried to remove some of the 
duplication that resulted from Paul's switch from using MenuOpen to 
MenuHighlight. I'm not sure if this will break anything, but so far menus seem 
to be working better in my apps. 


Diff:
Modified: trunk/dabo/ui/uiwx/dMenu.py
===================================================================
--- trunk/dabo/ui/uiwx/dMenu.py 2009-01-05 14:51:02 UTC (rev 4906)
+++ trunk/dabo/ui/uiwx/dMenu.py 2009-01-05 14:56:52 UTC (rev 4907)
@@ -39,7 +39,7 @@
                pm.dPemMixin.__init__(self, preClass, parent, properties, 
attProperties, *args, **kwargs)
 
 
-       def _onMenuOpenMRU(self, evt):
+       def __onMenuOpenMRU(self, evt):
                if self.Application:
                        self.Application.onMenuOpenMRU(self)
        
@@ -48,13 +48,14 @@
                """See self._setId(), which is where the binding of wxEvents 
needs to take 
                place.
                """
-               self.bindEvent(dEvents.MenuOpen, self._onMenuHighlight)
-               self.bindEvent(dEvents.MenuHighlight, self._onMenuHighlight)
+               self.bindEvent(dEvents.MenuOpen, self.__onMenuHighlight)
+               self.bindEvent(dEvents.MenuHighlight, self.__onMenuHighlight)
                if self._useMRU:
-                       self.bindEvent(dEvents.MenuOpen, self._onMenuOpenMRU)
+                       self.bindEvent(dEvents.MenuOpen, self.__onMenuOpenMRU)
 
+               
 
-       def _onMenuHighlight(self, evt):
+       def __onMenuHighlight(self, evt):
                """Note that this code is here in a dabo binding instead of in 
the wx binding
                because of the way we've worked around wx limitations: dMenu as 
a top-level
                menu in a menu bar doesn't send wx events.
@@ -73,7 +74,6 @@
                        if de is not None:
                                if callable(de):
                                        item.Enabled = de()
-                       
                        if isinstance(item, dMenu):
                                item._setDynamicEnabled()
 
@@ -393,8 +393,8 @@
                        # limitations.
                        self.Application.uiApp.Bind(wx.EVT_MENU_HIGHLIGHT,
                                        self.__onWxMenuHighlight, id=id_)
-       
-       
+
+
        def _itemByCaption(self, cap, returnPos=False):
                """Common method for locating a menu item by its caption, 
ignoring
                all the 'special' characters for acceleration.




_______________________________________________
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