dabo Commit
Revision 3366
Date: 2007-09-13 06:21:58 -0700 (Thu, 13 Sep 2007)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3366

Changed:
U   trunk/dabo/dApp.py

Log:
Added the property 'DefaultMenuBarClass' to the app. Forms will use this class 
for their MenuBar if their MenuBarClass property is not specified. This allows 
you to set a "global" default menu bar class without having to set it for each 
individual form.


Diff:
Modified: trunk/dabo/dApp.py
===================================================================
--- trunk/dabo/dApp.py  2007-09-13 05:13:01 UTC (rev 3365)
+++ trunk/dabo/dApp.py  2007-09-13 13:21:58 UTC (rev 3366)
@@ -960,6 +960,17 @@
                dabo.dbActivityLog.LogObject = f
 
 
+       def _getDefaultMenuBarClass(self):
+               try:
+                       cls = self._defaultMenuBarClass
+               except AttributeError:
+                       cls = self._defaultMenuBarClass = dabo.ui.dBaseMenuBar
+               return cls
+
+       def _setDefaultMenuBarClass(self, val):
+               self._defaultMenuBarClass = val
+               
+
        def _getDrawSizerOutlines(self):
                return self.uiApp.DrawSizerOutlines
        
@@ -1191,6 +1202,10 @@
                        _("""Path to the file (or file-like object) to be used 
for logging all database 
                        activity. Default=None, which means no log is kept.   
(file or str)"""))
        
+       DefaultMenuBarClass = property(_getDefaultMenuBarClass, 
_setDefaultMenuBarClass, None,
+                       _("""The class used by all forms in the application 
when no specific MenuBarClass 
+                       is specified  (dabo.ui.dMenuBar)"""))
+       
        DrawSizerOutlines = property(_getDrawSizerOutlines, 
_setDrawSizerOutlines, None,
                        _("Determines if sizer outlines are drawn on the 
ActiveForm.  (bool)"))
        




_______________________________________________
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/dabo-dev/[EMAIL PROTECTED]

Reply via email to