Changeset 174

Show
Ignore:
Timestamp:
04/13/04 14:26:19 (5 years ago)
Author:
paul
Message:

Minor fixes for Windows. One remaining problem is that Windows dForm's don't fire an implicit Activate event when first instantiated, so my logic for restoring size and position isn't working. I think this will fix itself when I move to three-stage creation, which is on my list for the ability to integrate resource files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ui/uiwx/classes/dForm.py

    r172 r174  
    2727        else: 
    2828            style = wx.DEFAULT_FRAME_STYLE 
    29         wxFrameClass.__init__(self, parent, -1, "", (-1,-1), (-1,-1), style) 
     29        wxFrameClass.__init__(self, parent, -1, "", style=style) 
    3030 
    3131        self.Name = name 
  • trunk/ui/uiwx/classes/dFormMixin.py

    r172 r174  
    33import dPemMixin as pm 
    44import dMainMenuBar as mnb 
    5 import dMenu 
     5import dMenu, dMessageBox 
    66 
    77class dFormMixin(pm.dPemMixin): 
     
    1717            self.dApp.uiForms.add(self) 
    1818         
    19         self.restoredSP = False   
     19        self.restoredSP = False 
    2020         
    2121        if self.dApp: 
     
    2525         
    2626    def OnActivate(self, event):  
    27         if event.GetActive() == 1 and self.restoredSP == False: 
     27        if bool(event.GetActive()) == True and self.restoredSP == False: 
    2828            # Restore the saved size and position, which can't happen  
    2929            # in __init__ because we may not have our name yet. 
     30            self.restoredSP = True 
    3031            self.restoreSizeAndPosition() 
    31             self.restoredSP = True 
    3232        event.Skip() 
    3333     
     
    7474        and set those properties on this form. 
    7575        ''' 
     76        dMessageBox.stop("restore: %s, %s" % (self.GetName(), self.dApp)) 
    7677        if self.dApp: 
    7778            name = self.GetName() 
  • trunk/ui/uiwx/classes/dProgressDialog.py

    r144 r174  
    7070class dProgressDialog(wx.Dialog): 
    7171    def __init__(self, parent, caption="Progress Dialog", func=None, wait=0): 
    72         wx.Dialog.__init__(self,parent,-1,caption,style=0
     72        wx.Dialog.__init__(self,parent,-1,caption
    7373 
    7474        self.Centre(wx.BOTH) 
    7575        self.SetSize((300,100)) 
    7676         
    77         self.status = wx.StaticText(self,-1,'',pos=(0,100)) 
     77        self.status = wx.StaticText(self,-1,'Please Wait...',pos=(0,100)) 
    7878 
    7979        wx.EVT_CLOSE(self, self.OnClose) 
     
    9090    def start(self, func): 
    9191        if func: 
    92             self.status.SetLabel('Please Wait...') 
    9392            self.worker = WorkerThread(self, func) 
    9493        else: