diff options
author | Anton Khirnov <wyskas@gmail.com> | 2009-02-23 19:03:32 +0100 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2009-02-23 19:03:32 +0100 |
commit | aa28db29c5510a2409f5dd53443d6ca0d9df3358 (patch) | |
tree | 0bf1489b70c39caddb7e952b0b288d87ab153db7 /nephilim | |
parent | 54ed65e5334ebc8b5bddcec9d26da2bbd506c58c (diff) |
Notify: add descriptions and tooltips for settings.
Diffstat (limited to 'nephilim')
-rw-r--r-- | nephilim/plugins/Notify.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/nephilim/plugins/Notify.py b/nephilim/plugins/Notify.py index 3c25d13..ccfc393 100644 --- a/nephilim/plugins/Notify.py +++ b/nephilim/plugins/Notify.py @@ -12,7 +12,7 @@ NOTIFY_PRIORITY_VOLUME = 2 class winNotify(QtGui.QWidget): _timerID = None winMain = None - p =None + p = None _current_priority = 0 @@ -48,7 +48,7 @@ class winNotify(QtGui.QWidget): def mousePressEvent(self, event): self.hide() - def show(self, text, time = 3, priority = 0): + def show(self, text, time = 3000, priority = 0): if not priority >= self._current_priority: return self._current_priority = priority @@ -64,7 +64,7 @@ class winNotify(QtGui.QWidget): self.resize(self.layout().sizeHint()) self.centerH() self.setVisible(True) - self.timer.start(time*1000) + self.timer.start(time) def hide(self): if self._timerID: @@ -81,7 +81,7 @@ class winNotify(QtGui.QWidget): class Notify(Plugin): o=None DEFAULTS = {'songformat' : '$track - $artist - $title ($album) [$length]', - 'timer' : 3} + 'timer' : 3000} def __init__(self, winMain): Plugin.__init__(self, winMain, 'Notify') self.addListener('onSongChange', self.onSongChange) @@ -132,8 +132,10 @@ class Notify(Plugin): self.timer.setValidator(QtGui.QIntValidator(self.timer)) self.setLayout(QtGui.QVBoxLayout()) - self.layout().addWidget(self.format) - self.layout().addWidget(self.timer) + self._add_widget(self.format, 'Format', 'Format of notifications. All tags supported by MPD\n' + 'will be expanded to their values for current song,\n' + 'e.g. $track, $title, $artist, $album, $length, $date, etc.') + self._add_widget(self.timer, 'Duration', 'How long should notifications be displayed in ms.') self.settings.endGroup() def save_settings(self): |