Changeset 109

Show
Ignore:
Timestamp:
03/05/06 17:29:22 (18 years ago)
Author:
jerome
Message:

Temporarily removed menu which causes problems with wxPython 2.5 and higher.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykoticon/trunk/bin/pykoticon

    r108 r109  
    217217            wx.EVT_MENU(self.tbicon, self.TBMENU_CLOSE, \ 
    218218                                              self.OnTaskBarClose) 
    219             self.menu = wx.wxMenu() 
    220             self.menu.Append(self.TBMENU_RESTORE, _("Show Print Quota")) 
    221             self.menu.Append(self.TBMENU_CLOSE, _("Quit")) 
     219            #self.menu = wx.wxMenu() 
     220            #self.menu.Append(self.TBMENU_RESTORE, _("Show Print Quota")) 
     221            #self.menu.Append(self.TBMENU_CLOSE, _("Quit")) 
    222222         
    223223        wx.EVT_ICONIZE(self, self.OnIconify) 
     
    239239    def OnClose(self, event) : 
    240240        self.closeServer() 
    241         if hasattr(self, "menu") : 
     241        try : 
    242242            self.menu.Destroy() 
    243             del self.menu 
    244         if hasattr(self, "tbicon") and self.tbicon : 
     243        except AttributeError :     
     244            pass 
     245        try :     
    245246            self.tbicon.Destroy() 
    246             del self.tbicon 
     247        except AttributeError :     
     248            pass 
    247249        self.Destroy() 
    248250 
    249251    def OnTaskBarMenu(self, event) : 
    250252        if self.tbicon : 
    251             self.tbicon.PopupMenu(self.menu) 
     253            try : 
     254                self.tbicon.PopupMenu(self.menu) 
     255            except AttributeError :     
     256                pass 
    252257 
    253258    def OnTaskBarClose(self, event) :