Changeset 2997

Show
Ignore:
Timestamp:
03/28/2007 05:31:29 AM (2 years ago)
Author:
ed
Message:

Fixed a docstring in dApp.

Added a BasePrefKey? to dShell, as I was getting tired of the constant warnings.

Tweaked the SplashScreen? class a bit, based on reading more of the docs for shaped frames. Added some defensive code to the font zooming methods in case self.ActiveForm? was None.

Files:

Legend:

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

    r2962 r2997  
    226226        self._wasSetup = True 
    227227 
     228 
    228229    def startupForms(self): 
    229                  
    230         # Open one or more of the defined forms.  
    231         # A default one is specified in .default_form. 
    232         # If form names were  
    233         # passed on the command line, they will be opened instead of the default one 
    234         # as long as they exist. 
    235  
     230        """Open one or more of the defined forms. The default one is specified  
     231        in .default_form. If form names were passed on the command line,  
     232        they will be opened instead of the default one as long as they exist. 
     233        """ 
    236234        form_names = [class_name[3:] for class_name in dir(self.ui) if class_name[:3] == "Frm"] 
    237235        for arg in sys.argv[1:]: 
  • trunk/dabo/ui/uiwx/dShell.py

    r2968 r2997  
    347347 
    348348def main(): 
    349     app = dabo.dApp(
     349    app = dabo.dApp(BasePrefKey="dabo.ui.dShell"
    350350    app.MainFormClass = dShell 
    351351    app.setup() 
  • trunk/dabo/ui/uiwx/uiApp.py

    r2967 r2997  
    2929        wx.Frame.__init__(self, None, -1, style=style) 
    3030         
     31        self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) 
    3132        if isinstance(bitmap, basestring): 
    3233            # Convert it 
     
    7475        try: 
    7576            self.fc.Stop() 
     77            self.fc.Destroy() 
    7678        except: 
    7779            pass 
     
    194196 
    195197 
     198    # The following three functions handle font zooming 
    196199    def fontZoomIn(self): 
    197         self.ActiveForm.iterateCall("fontZoomIn") 
     200        af = self.ActiveForm 
     201        if af: 
     202            af.iterateCall("fontZoomIn") 
    198203    def fontZoomOut(self): 
    199         self.ActiveForm.iterateCall("fontZoomOut") 
     204        af = self.ActiveForm 
     205        if af: 
     206            af.iterateCall("fontZoomOut") 
    200207    def fontZoomNormal(self): 
    201         self.ActiveForm.iterateCall("fontZoomNormal") 
     208        af = self.ActiveForm 
     209        if af: 
     210            af.iterateCall("fontZoomNormal") 
     211 
    202212 
    203213    def setup(self):