diff options
author | Anton Khirnov <wyskas@gmail.com> | 2009-03-14 17:21:49 +0100 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2009-03-14 17:21:49 +0100 |
commit | 75d4f040a99db84bfeb82b697268bc4594dad0fe (patch) | |
tree | 961a4f837fd960ec53d4ac5e36a05cbcc9255da1 /nephilim/plugins/Systray.py | |
parent | 49eaf10d075053dcd45fa0e7a97d63bbd89c25b2 (diff) |
Icons fixes:
add and use new program icon and icons for some functions. Remove some
old unused icons.
Diffstat (limited to 'nephilim/plugins/Systray.py')
-rw-r--r-- | nephilim/plugins/Systray.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/nephilim/plugins/Systray.py b/nephilim/plugins/Systray.py index ed13832..f0b139a 100644 --- a/nephilim/plugins/Systray.py +++ b/nephilim/plugins/Systray.py @@ -8,13 +8,9 @@ class Systray(Plugin): o = None format = None eventObj = None - time = None # indicator of current time [0..64] - appIcon = None - pixmap = None DEFAULTS = {'format': '$track - $title by $artist on $album ($length)'} def _load(self): - self.appIcon = QtGui.QIcon(appIcon) self.format = self.settings().value(self.name() + '/format').toString() class SystrayWheelEventObject(QtCore.QObject): """This class listens for systray-wheel events""" @@ -34,10 +30,6 @@ class Systray(Plugin): self.parent().connect(self.o, QtCore.SIGNAL('activated (QSystemTrayIcon::ActivationReason)') , self.onSysTrayClick) - self.connect(self.mpclient(), QtCore.SIGNAL('song_changed'), self.update) - self.connect(self.mpclient(), QtCore.SIGNAL('disconnected'), self.update) - self.connect(self.mpclient(), QtCore.SIGNAL('time_changed'), self.update) - self.o.show() def _unload(self): self.disconnect(self.mpclient(), QtCore.SIGNAL('song_changed'), self.update) @@ -67,27 +59,10 @@ class Systray(Plugin): else: self.o.setToolTip('%s not playing'%APPNAME) - try: - curTime = (64*status['time'])/status['length'] - except: - curTime = -1 - if self.time != curTime: - self.time = curTime - # redraw the systray icon - self.pixmap = self.appIcon.pixmap(64,64) - painter = QtGui.QPainter(self.pixmap) - painter.fillRect(1, curTime, 63, 64, self.parent().palette().brush(QtGui.QPalette.Base)) - self.appIcon.paint(painter, 1, 0, 63, 64) - self.o.setIcon(QtGui.QIcon(self.pixmap)) - elif not song: - self.time = None - self.o.setIcon(QtGui.QIcon(appIcon)) - def onSysTrayClick(self, reason): if reason == QtGui.QSystemTrayIcon.Trigger or\ reason == QtGui.QSystemTrayIcon.Context: w = self.parent() - # left mouse button if w.isVisible(): w.setVisible(False) else: |