# HG changeset patch # User Goffi # Date 1256602895 -3600 # Node ID 37153f3a3dc139c61a31afda3066a84b5b6e4704 # Parent 14d7861ca59e24cbec8d58dcba32f4d4ee35015c wix: Tray Icon diff -r 14d7861ca59e -r 37153f3a3dc1 frontends/wix/images/WARNING --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/frontends/wix/images/WARNING Tue Oct 27 01:21:35 2009 +0100 @@ -0,0 +1,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. diff -r 14d7861ca59e -r 37153f3a3dc1 frontends/wix/images/tray_icon.png Binary file frontends/wix/images/tray_icon.png has changed diff -r 14d7861ca59e -r 37153f3a3dc1 frontends/wix/images/tray_icon_warning.png Binary file frontends/wix/images/tray_icon_warning.png has changed diff -r 14d7861ca59e -r 37153f3a3dc1 frontends/wix/main_window.py --- a/frontends/wix/main_window.py Mon Oct 26 18:26:21 2009 +0100 +++ b/frontends/wix/main_window.py Tue Oct 27 01:21:35 2009 +0100 @@ -179,6 +179,13 @@ 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 @@ 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()