Show
Ignore:
Timestamp:
01/15/05 20:41:16 (19 years ago)
Author:
jerome
Message:

Better exit, but not yet there...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykoticon/trunk/bin/pykoticon

    r63 r64  
    226226        self.menu.Append(self.TBMENU_CLOSE, "Quit") 
    227227         
     228        wxPython.wx.EVT_CLOSE(self, self.OnClose) 
     229         
    228230        self.TBTIMER = wx.NewId() 
    229231        self.chrono = wxPython.wx.wxTimer(self, self.TBTIMER) 
     
    267269                else :     
    268270                    self.tbicon.SetIcon(self.greenicon, "PyKotIcon") 
     271                if not self.IsIconized() :     
     272                    self.Iconize(True) 
     273                if self.IsShown():     
     274                    self.Hide() 
    269275                if hasattr(self, "quotasgrid") :     
    270276                    self.quotasgrid.Destroy() 
    271277                    del self.quotasgrid 
    272278                self.quotasgrid = PyKotIconGrid(self, self.User.Quotas)     
     279                if self.IsIconized() : 
     280                    self.Iconize(False) 
     281                if not self.IsShown() : 
     282                    self.Show(True) 
    273283            self.inTimer = False 
    274284        # Now we want it every 3 minutes     
    275         self.chrono.Start(1000 * 60 * 3) # every 3 minutes 
     285        #self.chrono.Start(1000 * 60 * 3) # every 3 minutes 
     286        self.chrono.Start(1000 * 20) # every 20 seconds 
    276287     
    277288    def OnIconify(self, event) : 
     
    285296        self.Raise() 
    286297 
    287     def OnCloseWindow(self, event) : 
     298    def OnClose(self, event) : 
    288299        if hasattr(self, "chrono") : 
    289300            self.chrono.Stop() 
    290301            del self.chrono 
    291302        if hasattr(self, "menu") : 
    292             menu.Destroy() 
     303            self.menu.Destroy() 
    293304            del self.menu 
    294305        if hasattr(self, "tbicon") :