summaryrefslogtreecommitdiff
path: root/src/leap/baseapp/systray.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/baseapp/systray.py')
-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 0ab37f7f..1939bc09 100644
--- a/src/leap/baseapp/systray.py
+++ b/src/leap/baseapp/systray.py
@@ -163,9 +163,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)