- Timestamp:
- 01/20/05 18:59:07 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykoticon/trunk/bin/pykoticon
r77 r79 287 287 | wxPython.wx.wxICONIZE \ 288 288 | wxPython.wx.wxNO_FULL_REPAINT_ON_RESIZE) 289 self.tbicon = wxPython.wx.wxTaskBarIcon() 289 try : 290 self.tbicon = wxPython.wx.wxTaskBarIcon() 291 except AttributeError : 292 self.tbicon = None # No taskbar icon facility, old wxWidgets maybe 290 293 291 294 self.greenicon = wxPython.wx.wxIcon(os.path.join(iconsdir, "pykoticon-green.ico"), \ … … 295 298 296 299 self.SetIcon(self.greenicon) 297 self.tbicon.SetIcon(self.greenicon, "PyKotIcon") 298 299 wxPython.wx.EVT_TASKBAR_LEFT_DCLICK(self.tbicon, self.OnTaskBarActivate) 300 wxPython.wx.EVT_TASKBAR_RIGHT_UP(self.tbicon, self.OnTaskBarMenu) 300 if self.tbicon is not None : 301 self.tbicon.SetIcon(self.greenicon, "PyKotIcon") 302 wxPython.wx.EVT_TASKBAR_LEFT_DCLICK(self.tbicon, self.OnTaskBarActivate) 303 wxPython.wx.EVT_TASKBAR_RIGHT_UP(self.tbicon, self.OnTaskBarMenu) 304 305 self.TBMENU_RESTORE = wx.NewId() 306 self.TBMENU_CLOSE = wx.NewId() 307 wxPython.wx.EVT_MENU(self.tbicon, self.TBMENU_RESTORE, \ 308 self.OnTaskBarActivate) 309 wxPython.wx.EVT_MENU(self.tbicon, self.TBMENU_CLOSE, \ 310 self.OnTaskBarClose) 311 self.menu = wxPython.wx.wxMenu() 312 self.menu.Append(self.TBMENU_RESTORE, _("Show Print Quota")) 313 self.menu.Append(self.TBMENU_CLOSE, _("Quit")) 314 301 315 wxPython.wx.EVT_ICONIZE(self, self.OnIconify) 302 303 self.TBMENU_RESTORE = wx.NewId()304 self.TBMENU_CLOSE = wx.NewId()305 wxPython.wx.EVT_MENU(self.tbicon, self.TBMENU_RESTORE, \306 self.OnTaskBarActivate)307 wxPython.wx.EVT_MENU(self.tbicon, self.TBMENU_CLOSE, \308 self.OnTaskBarClose)309 self.menu = wxPython.wx.wxMenu()310 self.menu.Append(self.TBMENU_RESTORE, _("Show Print Quota"))311 self.menu.Append(self.TBMENU_CLOSE, _("Quit"))312 313 316 wxPython.wx.EVT_CLOSE(self, self.OnClose) 314 317 … … 333 336 if self.User.Balance <= 0.0 : 334 337 self.SetIcon(self.redicon) 335 self.tbicon.SetIcon(self.redicon, "PyKotIcon") 338 if self.tbicon is not None : 339 self.tbicon.SetIcon(self.redicon, "PyKotIcon") 336 340 else : 337 341 self.SetIcon(self.greenicon) 338 self.tbicon.SetIcon(self.greenicon, "PyKotIcon") 342 if self.tbicon is not None : 343 self.tbicon.SetIcon(self.greenicon, "PyKotIcon") 339 344 else : 340 345 isRed = False … … 351 356 if isRed is True : 352 357 self.SetIcon(self.redicon) 353 self.tbicon.SetIcon(self.redicon, "PyKotIcon") 358 if self.tbicon is not None : 359 self.tbicon.SetIcon(self.redicon, "PyKotIcon") 354 360 else : 355 361 self.SetIcon(self.greenicon) 356 self.tbicon.SetIcon(self.greenicon, "PyKotIcon") 362 if self.tbicon is not None : 363 self.tbicon.SetIcon(self.greenicon, "PyKotIcon") 357 364 if hasattr(self, "quotasgrid") : 358 365 self.quotasgrid.Close()