diff options
-rw-r--r-- | nephilim/clPlugin.py | 8 | ||||
-rw-r--r-- | nephilim/plugins/AlbumCover.py | 8 | ||||
-rw-r--r-- | nephilim/winSettings.py | 15 |
3 files changed, 17 insertions, 14 deletions
diff --git a/nephilim/clPlugin.py b/nephilim/clPlugin.py index efbd502..ed1ed69 100644 --- a/nephilim/clPlugin.py +++ b/nephilim/clPlugin.py @@ -12,7 +12,7 @@ class Plugin: winMain = None loaded = None listeners = None - mpclient = None + mpclient = None DEFAULTS = {} def __init__(self, winMain, name): @@ -83,17 +83,17 @@ class Plugin: class SettingsWidget(QtGui.QWidget): """ plugins should subclass this""" - plugin = None + plugin = None settings = None def __init__(self, plugin): QtGui.QWidget.__init__(self) - self.plugin = plugin + self.plugin = plugin self.settings = QtCore.QSettings(ORGNAME, APPNAME) def save_settings(self): """ reimplement this""" - self.plugin.saveSettings() + pass def _add_widget(self, widget, label = '', tooltip = ''): """adds a widget with label""" diff --git a/nephilim/plugins/AlbumCover.py b/nephilim/plugins/AlbumCover.py index e8dd38d..27ab6df 100644 --- a/nephilim/plugins/AlbumCover.py +++ b/nephilim/plugins/AlbumCover.py @@ -231,9 +231,13 @@ class AlbumCover(Plugin): self._add_widget(self.coverdir, 'Cover directory', 'Where should %s store covers.\n' '$musicdir will be expanded to path to MPD music library\n' - '$songdir will be expanded to path to the song (relative to $musicdir' + '$songdir will be expanded to path to the song (relative to $musicdir\n' + 'other tags same as in covername' %APPNAME) - self._add_widget(self.covername, 'Cover filename', 'Filename for %s cover files.'%APPNAME) + self._add_widget(self.covername, 'Cover filename', 'Filename for %s cover files.\n' + 'All tags supported by MPD will be expanded to their\n' + 'values for current song, e.g. $title, $track, $artist,\n' + '$album, $genre etc.'%APPNAME) self.settings.endGroup() def save_settings(self): diff --git a/nephilim/winSettings.py b/nephilim/winSettings.py index 4265918..9f4d804 100644 --- a/nephilim/winSettings.py +++ b/nephilim/winSettings.py @@ -4,6 +4,7 @@ import os from misc import ORGNAME, APPNAME, Button, appIcon import plugins +import clPlugin class winSettings(QtGui.QWidget): @@ -15,9 +16,8 @@ class winSettings(QtGui.QWidget): settings = None settings_wg = [] - class SettingsWidgetMPD(QtGui.QWidget): - mpclient = None - settings = None + class SettingsWidgetMPD(clPlugin.Plugin.SettingsWidget): + mpclient = None host_txt = None port_txt = None lib_txt = None @@ -25,8 +25,7 @@ class winSettings(QtGui.QWidget): outputs = None def __init__(self, mpclient): - QtGui.QWidget.__init__(self) - self.settings = QtCore.QSettings(ORGNAME, APPNAME) + clPlugin.Plugin.SettingsWidget.__init__(self, None) self.mpclient = mpclient self.settings.beginGroup('MPD') @@ -58,9 +57,9 @@ class winSettings(QtGui.QWidget): self.outputs.layout().addWidget(box) self.setLayout(QtGui.QVBoxLayout()) - self.layout().addWidget(self.host_txt) - self.layout().addWidget(self.port_txt) - self.layout().addWidget(self.lib_txt) + self._add_widget(self.host_txt, 'Host', 'Host or socket to connect to') + self._add_widget(self.port_txt, 'Port', 'Port to use (empty when using sockets)') + self._add_widget(self.lib_txt, 'Music library', 'Path to music library') self.layout().addWidget(self.update) self.layout().addWidget(self.outputs) |