dabo Commit
Revision 7025
Date: 2011-12-12 14:57:03 -0800 (Mon, 12 Dec 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/7025

Changed:
U   trunk/dabo/ui/uiwx/dBaseMenuBar.py
U   trunk/dabo/ui/uiwx/dMenuBar.py

Log:
Fixed dBaseMenuBar to allow appdev subclasses to put their menus in the bar
in relation to the default menus. Previously, the base menu items were added
at the end of the afterInit() cycle. Now, they are added at the beginning of
it.

Added needed _setId() calls when adding menus to the menu bar.


Diff:
Modified: trunk/dabo/ui/uiwx/dBaseMenuBar.py
===================================================================
--- trunk/dabo/ui/uiwx/dBaseMenuBar.py  2011-12-10 19:10:02 UTC (rev 7024)
+++ trunk/dabo/ui/uiwx/dBaseMenuBar.py  2011-12-12 22:57:03 UTC (rev 7025)
@@ -175,11 +175,11 @@
        dMenuItem(s) that your application needs.
        """
        def _afterInit(self):
-               super(dBaseMenuBar, self)._afterInit()
                self.fileMenu = self.appendMenu(FileMenu(self, 
MenuID="base_file"))
                self.editMenu = self.appendMenu(EditMenu(self, 
MenuID="base_edit"))
                self.viewMenu = self.appendMenu(ViewMenu(self, 
MenuID="base_view"))
                self.helpMenu = self.appendMenu(HelpMenu(self, 
MenuID="base_help"))
+               super(dBaseMenuBar, self)._afterInit()
 
 
 

Modified: trunk/dabo/ui/uiwx/dMenuBar.py
===================================================================
--- trunk/dabo/ui/uiwx/dMenuBar.py      2011-12-10 19:10:02 UTC (rev 7024)
+++ trunk/dabo/ui/uiwx/dMenuBar.py      2011-12-12 22:57:03 UTC (rev 7025)
@@ -55,6 +55,7 @@
                ok = self.Append(menu, menu.Caption)
                if ok:
                        menu.Parent = self
+                       menu._setId(menu._getID())
                return menu
 
 
@@ -67,6 +68,7 @@
                ok = self.Insert(pos, menu, menu.Caption)
                if ok:
                        menu.Parent = self
+                       menu._setId(menu._getID())
                return menu
 
 
@@ -78,6 +80,7 @@
                ok = self.PrependMenu(menu, menu.Caption)
                if ok:
                        menu.Parent = self
+                       menu._setId(menu._getID())
                return menu
 
 



_______________________________________________
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