summaryrefslogtreecommitdiff
path: root/nephilim/plugins/Systray.py
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2009-06-20 17:10:53 +0200
committerAnton Khirnov <wyskas@gmail.com>2009-06-20 17:10:53 +0200
commitc6af9fe01cb3bea21471f839ec26a07b04ac24c2 (patch)
tree704e0d0542e8bf5a22a3d8632c9885cd989c1d5b /nephilim/plugins/Systray.py
parente7e7093a12fb5eb52fd0bb3071a7c85c7d8aefbd (diff)
plugin: make mpclient a var instead of a function.
Diffstat (limited to 'nephilim/plugins/Systray.py')
-rw-r--r--nephilim/plugins/Systray.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/nephilim/plugins/Systray.py b/nephilim/plugins/Systray.py
index 2dc16f8..23f7210 100644
--- a/nephilim/plugins/Systray.py
+++ b/nephilim/plugins/Systray.py
@@ -36,7 +36,7 @@ class Systray(Plugin):
if type(event)==QtGui.QWheelEvent:
numDegrees=event.delta() / 8
numSteps=5*numDegrees/15
- self.plugin.mpclient().set_volume(self.plugin.mpclient().volume() + numSteps)
+ self.plugin.mpclient.set_volume(self.plugin.mpclient.volume() + numSteps)
event.accept()
return True
return False
@@ -48,12 +48,12 @@ 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('song_changed'), self.update)
self.o.show()
def _unload(self):
- self.disconnect(self.mpclient(), QtCore.SIGNAL('song_changed'), self.update)
- self.disconnect(self.mpclient(), QtCore.SIGNAL('disconnected'), self.update)
- self.disconnect(self.mpclient(), QtCore.SIGNAL('time_changed'), self.update)
+ self.disconnect(self.mpclient, QtCore.SIGNAL('song_changed'), self.update)
+ self.disconnect(self.mpclient, QtCore.SIGNAL('disconnected'), self.update)
+ self.disconnect(self.mpclient, QtCore.SIGNAL('time_changed'), self.update)
self.o.hide()
self.o.setIcon(QtGui.QIcon(None))
self.o = None
@@ -62,7 +62,7 @@ class Systray(Plugin):
return "Display the mpclientpc icon in the systray."
def update(self):
- status = self.mpclient().status()
+ status = self.mpclient.status()
if not status:
return
@@ -72,7 +72,7 @@ class Systray(Plugin):
values['length'] = sec2min(status['length'])
values['time'] = sec2min(status['time'])
- song = self.mpclient().current_song()
+ song = self.mpclient.current_song()
if song:
self.o.setToolTip(expand_tags(self.format, (song,)))
else:
@@ -87,10 +87,10 @@ class Systray(Plugin):
else:
w.setVisible(True)
elif reason == QtGui.QSystemTrayIcon.MiddleClick:
- if self.mpclient().is_playing():
- self.mpclient().pause()
+ if self.mpclient.is_playing():
+ self.mpclient.pause()
else:
- self.mpclient().resume()
+ self.mpclient.resume()
class SettingsWidgetSystray(Plugin.SettingsWidget):
format = None