changeset 1197:69ffe61240eb

wix: Avoid setting a bad icon From 6fb18309a1d971235c0c3d568704fd91809d2d6e Mon Sep 17 00:00:00 2001 The code tries to load an icon from 'icons/crystal/32/tray_icon.xpm' (relative to self.media_dir), which is part of sat_media, released independently by upstream and not yet part of Debian. It then tries to set this invalid icon. With wxPython 2.8 these issues get quietly ignored, but wxPython 3.0 reports them. As a simple workaround I've just added a check that the icon is valid before setting it, so now you get a messagebox about the icon file not being found and then the app starts. Obviously it would be better to package sat_media so that the icon is available on the system.
author Olly Betts <>
date Tue, 09 Sep 2014 18:51:35 -0400
parents 268278d9aef2
children 16ce9a6580a3
files frontends/src/wix/
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/wix/	Mon Sep 15 13:29:38 2014 +0200
+++ b/frontends/src/wix/	Tue Sep 09 18:51:35 2014 -0400
@@ -84,7 +84,8 @@
         #tray icon
         ticon = wx.Icon(os.path.join(self.media_dir, 'icons/crystal/32/tray_icon.xpm'), wx.BITMAP_TYPE_XPM)
         self.tray_icon = wx.TaskBarIcon()
-        self.tray_icon.SetIcon(ticon, _("Wix jabber client"))
+        if ticon.IsOk():
+            self.tray_icon.SetIcon(ticon, _("Wix jabber client"))
         wx.EVT_TASKBAR_LEFT_UP(self.tray_icon, self.onTrayClick)