From: stack Date: Sun, 8 Jul 2012 16:12:59 +0000 (+0200) Subject: added dumb icon to tray X-Git-Url: https://v.licheni.net/stack/code/dboxswitch.git/commitdiff_plain/f345826d581ce3c2894b36c9a56a17fc4b6cde90?ds=inline;hp=d35841e733bab5bb5ddaae55afc81c904cf4940d added dumb icon to tray --- diff --git a/gui.py b/gui.py index 81165a0..6ed893d 100755 --- a/gui.py +++ b/gui.py @@ -77,12 +77,14 @@ class Gui(QtGui.QDialog): self.quitAction = QtGui.QAction("&Quit", self, triggered=QtGui.qApp.quit) + def createTrayIcon(self): self.trayIconMenu = QtGui.QMenu(self) self.trayIconMenu.addAction(self.manageprofiles) self.trayIconMenu.addSeparator() self.trayIconMenu.addAction(self.quitAction) - self.trayIcon = QtGui.QSystemTrayIcon(self) + self.trayIcon = QtGui.QSystemTrayIcon(QtGui.QIcon(appconf.icon), self.app) self.trayIcon.setContextMenu(self.trayIconMenu) + #baloon on hover self.trayIcon.setToolTip(appconf.appname+" "+appconf.appversion+"\nRight Click to manage profiles.") diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..110c285 Binary files /dev/null and b/icon.png differ diff --git a/settings.py b/settings.py index 550c7db..0ba170b 100644 --- a/settings.py +++ b/settings.py @@ -4,7 +4,7 @@ class Settings(): def __init__(self): self.appname = "dboxswitch" self.appversion = "0.1" - self.icon = "icon.xpm" + self.icon = "./icon.png" global conf appconf = Settings()