summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-10-05 21:22:36 +0900
committerkali <kali@leap.se>2012-10-05 21:22:36 +0900
commit6cd947041b3352bebddf3863a86b0a15f8222bcf (patch)
tree65b377849cc2f7587dc19f8e847ef954dbb3fc24 /src
parent1cbf954d9eda71cabfa58811c09bc63cfe9465d5 (diff)
fix seticon call breakage when interface dies
Diffstat (limited to 'src')
-rw-r--r--src/leap/baseapp/systray.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/leap/baseapp/systray.py b/src/leap/baseapp/systray.py
index 39a23f49..adcfe9b9 100644
--- a/src/leap/baseapp/systray.py
+++ b/src/leap/baseapp/systray.py
@@ -162,9 +162,10 @@ class StatusAwareTrayIconMixin(object):
oldlayout.itemAt(new).widget().show()
def setIcon(self, name):
- icon = self.Icons.get(name)(self)
- self.trayIcon.setIcon(icon)
- #self.setWindowIcon(icon)
+ icon_fun = self.Icons.get(name)
+ if icon_fun and callable(icon_fun):
+ icon = icon_fun(self)
+ self.trayIcon.setIcon(icon)
def getIcon(self, icon_name):
return self.states.get(icon_name, None)