wix: Tray Icon
This commit is contained in:
parent
02e15d0089
commit
a9f838a6f2
4 changed files with 17 additions and 0 deletions
1
frontends/wix/images/WARNING
Normal file
1
frontends/wix/images/WARNING
Normal file
|
|
@ -0,0 +1 @@
|
|||
these pictures come from http://commons.wikimedia.org/wiki/File:Crystal_Clear_app_browser.png and http://commons.wikimedia.org/wiki/File:Crystal_Clear_app_cache.png, authors (Everaldo Coelho and YellowIcon) need to be correctly quoted and licence must be present before publication.
|
||||
BIN
frontends/wix/images/tray_icon.png
Normal file
BIN
frontends/wix/images/tray_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
frontends/wix/images/tray_icon_warning.png
Normal file
BIN
frontends/wix/images/tray_icon_warning.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
|
|
@ -179,6 +179,13 @@ class MainWindow(wx.Frame, QuickApp):
|
|||
self.Bind(wx.EVT_COMBOBOX, self.onStatusChange, self.statusBox)
|
||||
self.Bind(wx.EVT_TEXT_ENTER, self.onStatusChange, self.statusTxt)
|
||||
self.tools.Disable()
|
||||
|
||||
#tray icon
|
||||
ticon = wx.Icon("images/tray_icon.xpm", wx.BITMAP_TYPE_XPM)
|
||||
self.tray_icon = wx.TaskBarIcon()
|
||||
self.tray_icon.SetIcon(ticon, "Wix jabber client")
|
||||
wx.EVT_TASKBAR_LEFT_UP(self.tray_icon, self.onTrayClick)
|
||||
|
||||
|
||||
#events
|
||||
self.Bind(wx.EVT_CLOSE, self.onClose, self)
|
||||
|
|
@ -380,4 +387,13 @@ class MainWindow(wx.Frame, QuickApp):
|
|||
def onClose(self, e):
|
||||
info("Exiting...")
|
||||
e.Skip()
|
||||
|
||||
def onTrayClick(self, e):
|
||||
debug("Tray Click")
|
||||
if self.IsShown():
|
||||
self.Hide()
|
||||
else:
|
||||
self.Show()
|
||||
self.Raise()
|
||||
e.Skip()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue