From b2ba3189ff8ea39ad47cffc3f19a28814324aaf9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 22 Feb 2009 20:07:54 +0100 Subject: AlbumCover: rename actions to methods. --- nephilim/plugins/AlbumCover.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'nephilim/plugins') diff --git a/nephilim/plugins/AlbumCover.py b/nephilim/plugins/AlbumCover.py index 27ab6df..cd39d5f 100644 --- a/nephilim/plugins/AlbumCover.py +++ b/nephilim/plugins/AlbumCover.py @@ -29,7 +29,7 @@ class wgAlbumCover(QtGui.QLabel): # popup menu self.menu = QtGui.QMenu("album") select_file_action = self.menu.addAction('Select cover file...') - self.connect(select_file_action, QtCore.SIGNAL('triggered()'), self.select_cover_file) + self.connect(select_file_aciotn, QtCore.SIGNAL('triggered()'), self.select_cover_file) fetch_amazon_action = self.menu.addAction('Fetch cover from Amazon.') self.connect(fetch_amazon_action, QtCore.SIGNAL('triggered()'), self.fetch_amazon) @@ -79,7 +79,7 @@ class wgAlbumCover(QtGui.QLabel): if not os.path.exists(self.cover_filepath): success = False for i in [0, 1]: - src = self.p.settings.value(self.p.getName() + '/action%i'%i).toInt()[0] + src = self.p.settings.value(self.p.getName() + '/method%i'%i).toInt()[0] if src != AC_NO_FETCH: if self.fetchCoverSrc(song, src): success = True @@ -175,7 +175,7 @@ class wgAlbumCover(QtGui.QLabel): class AlbumCover(Plugin): o = None DEFAULTS = {'coverdir' : '$musicdir/$songdir', 'covername' : '.cover_nephilim_$artist_$album', - 'action0' : 1, 'action1' : 1} + 'method0' : 1, 'method1' : 1} def __init__(self, winMain): Plugin.__init__(self, winMain, 'AlbumCover') @@ -207,7 +207,7 @@ class AlbumCover(Plugin): return self._createDock(self.o) class SettingsWidgetAlbumCover(Plugin.SettingsWidget): - actions = [] + methods = [] coverdir = None covername = None @@ -215,19 +215,19 @@ class AlbumCover(Plugin): Plugin.SettingsWidget.__init__(self, plugin) self.settings.beginGroup(self.plugin.getName()) - self.actions = [QtGui.QComboBox(), QtGui.QComboBox()] - for i,action in enumerate(self.actions): - action.addItem("No action.") - action.addItem("Local dir") - action.addItem("Amazon") - action.setCurrentIndex(self.settings.value('action' + str(i)).toInt()[0]) + self.methods = [QtGui.QComboBox(), QtGui.QComboBox()] + for i,method in enumerate(self.methods): + method.addItem("No method.") + method.addItem("Local dir") + method.addItem("Amazon") + method.setCurrentIndex(self.settings.value('method' + str(i)).toInt()[0]) self.coverdir = QtGui.QLineEdit(self.settings.value('coverdir').toString()) self.covername = QtGui.QLineEdit(self.settings.value('covername').toString()) self.setLayout(QtGui.QVBoxLayout()) - self._add_widget(self.actions[0], 'Action 0') - self._add_widget(self.actions[1], 'Action 1') + self._add_widget(self.methods[0], 'Method 0') + self._add_widget(self.methods[1], 'Method 1') self._add_widget(self.coverdir, 'Cover directory', 'Where should %s store covers.\n' '$musicdir will be expanded to path to MPD music library\n' @@ -242,8 +242,8 @@ class AlbumCover(Plugin): def save_settings(self): self.settings.beginGroup(self.plugin.getName()) - self.settings.setValue('action0', QVariant(self.actions[0].currentIndex())) - self.settings.setValue('action1', QVariant(self.actions[1].currentIndex())) + self.settings.setValue('method0', QVariant(self.methods[0].currentIndex())) + self.settings.setValue('method1', QVariant(self.methods[1].currentIndex())) self.settings.setValue('coverdir', QVariant(self.coverdir.text())) self.settings.setValue('covername', QVariant(self.covername.text())) self.settings.endGroup() -- cgit v1.2.3