added dumb icon to tray
authorstack <stack@inventati.org>
Sun, 8 Jul 2012 16:12:59 +0000 (18:12 +0200)
committerstack <stack@inventati.org>
Sun, 8 Jul 2012 16:12:59 +0000 (18:12 +0200)
gui.py
icon.png [new file with mode: 0644]
settings.py

diff --git a/gui.py b/gui.py
index 81165a0..6ed893d 100755 (executable)
--- 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 (file)
index 0000000..110c285
Binary files /dev/null and b/icon.png differ
index 550c7db..0ba170b 100644 (file)
@@ -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()