Changeset 3264

Show
Ignore:
Timestamp:
07/19/07 16:25:58 (1 year ago)
Author:
paul
Message:

Added property dApp.ShowWebUpdateMenu? property, which determines if the
Web Update Preference option appears in the base menu. For apps that want
this functionality, such as the Dabo IDE, set the property to True in
your overridden dApp.initProperties() method and the option will appear.

I suggest renaming the option to "Configure Web Update", since it is active
rather than passive voice, as well as adding a menu separator prior to
the option.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/dApp.py

    r3261 r3264  
    789789    def onWebUpdatePrefs(self, evt): 
    790790        self.uiApp.onWebUpdatePrefs(evt) 
    791          
     791 
     792    def showWebUpdatePrefs(self): 
     793        self.onWebUpdatePrefs(None)      
    792794         
    793795    def onHelpAbout(self, evt): 
     
    10481050 
    10491051             
     1052    def _getShowWebUpdateMenu(self): 
     1053        v = getattr(self, "_showWebUpdateMenu", None) 
     1054        if v is None: 
     1055            v = self._showWebUpdateMenu = False 
     1056        return v 
     1057             
     1058    def _setShowWebUpdateMenu(self, val): 
     1059        self._showWebUpdateMenu = bool(val) 
     1060 
     1061 
    10501062    def _getUI(self): 
    10511063        try: 
     
    12131225            available in the base menu.""") ) 
    12141226 
     1227    ShowWebUpdateMenu = property(_getShowWebUpdateMenu, _setShowWebUpdateMenu, None,  
     1228            _("""Specifies whether the web update option is shown in the menu. 
     1229 
     1230            If True, there will be a Web Update Options menu item in the Help menu.  
     1231            If False (the default), your code can still start the Web Update Options 
     1232            screen by calling app.showWebUpdatePrefs() directly.""") ) 
     1233 
    12151234    UI = property(_getUI, _setUI, None,  
    12161235            _("""Specifies the user interface to load, or None. (str) 
  • trunk/dabo/ui/uiwx/dBaseMenuBar.py

    r3260 r3264  
    142142        wx.App_SetMacHelpMenuTitleName(self.Caption) 
    143143         
    144         self.append(_("Framework Web Update Settings"), OnHit=app.onWebUpdatePrefs, 
    145                 help=_("Change your preferences for web updates for the Dabo Framework")) 
     144        if app.ShowWebUpdateMenu: 
     145            self.append(_("Framework Web Update Settings"), OnHit=app.onWebUpdatePrefs, 
     146                    help=_("Change your preferences for web updates for the Dabo Framework")) 
    146147 
    147148