diff options
author | Anton Khirnov <wyskas@gmail.com> | 2009-03-12 15:46:53 +0100 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2009-03-12 15:46:53 +0100 |
commit | 56b718527ac633892d6dbf26c9ce7c9f2aa04c9f (patch) | |
tree | 939b48f634a7d6bbe70d2207df78abc550d4b816 /nephilim/plugins/Notify.py | |
parent | 328ecbe2513757f721115445b8f3302a0ff6d064 (diff) |
AlbumCover: cosmetics.
Diffstat (limited to 'nephilim/plugins/Notify.py')
-rw-r--r-- | nephilim/plugins/Notify.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/nephilim/plugins/Notify.py b/nephilim/plugins/Notify.py index ba998cc..f87e47a 100644 --- a/nephilim/plugins/Notify.py +++ b/nephilim/plugins/Notify.py @@ -45,7 +45,16 @@ class winNotify(QtGui.QWidget): font.setPixelSize(20) self.setFont(font) - self.connect + ac = self.parent.plugins.plugin('AlbumCover') + if ac: + self.connect(ac, QtCore.SIGNAL('cover_changed'), self.on_cover_changed) + + def on_cover_changed(self, cover): + if not cover: + self.cover_label.clear() + return + + self.cover_label.setPixmap(cover.scaledToHeight(self.fontInfo().pixelSize()*4)) def mousePressEvent(self, event): self.hide() @@ -55,13 +64,6 @@ class winNotify(QtGui.QWidget): return self._current_priority = priority - self.cover_label.clear() - ac = self.parent.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) self.resize(self.layout().sizeHint()) self.centerH() |