diff options
author | Anton Khirnov <wyskas@gmail.com> | 2009-02-20 17:15:48 +0100 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2009-02-20 17:15:48 +0100 |
commit | dfa8df621e4bc9c68215db76ae2a09bc16fe6a04 (patch) | |
tree | 4f9543d1326fa3b9dea7e3268e11b3acc64e6ca6 /nephilim/plugins/Notify.py | |
parent | eaccbb78851ecfcaa315e7398755571741aaad26 (diff) |
Simplify loading plugins.
Diffstat (limited to 'nephilim/plugins/Notify.py')
-rw-r--r-- | nephilim/plugins/Notify.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/nephilim/plugins/Notify.py b/nephilim/plugins/Notify.py index 83e0f96..f42805e 100644 --- a/nephilim/plugins/Notify.py +++ b/nephilim/plugins/Notify.py @@ -49,11 +49,12 @@ class winNotify(QtGui.QWidget): return self._current_priority = priority - cover = self.winMain.plugins.getPlugin('albumcover').getWidget().get_cover() - if cover: - self.cover_label.setPixmap(cover.scaledToHeight(self.fontInfo().pixelSize()*4)) - else: - self.cover_label.clear() + self.cover_label.clear() + ac = self.winMain.plugins.plugin('AlbumCover') + if ac: + cover = ac.get_cover() + if cover: + self.cover_label.setPixmap(cover.scaledToHeight(self.fontInfo().pixelSize()*4)) self.text_label.setText(text) if self._timerID: @@ -83,7 +84,7 @@ class winNotify(QtGui.QWidget): self.hide() self.update() -class pluginNotify(Plugin): +class Notify(Plugin): o=None DEFAULTS = {'songformat' : '$track - $artist - $title ($album) [$length]', 'timer' : 3} |