diff --git a/openlp/core/ui/shortcutlistform.py b/openlp/core/ui/shortcutlistform.py index 0316b0ee0..e83c2cc7d 100644 --- a/openlp/core/ui/shortcutlistform.py +++ b/openlp/core/ui/shortcutlistform.py @@ -69,7 +69,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog): if event.modifiers() & Qt.AltModifier == Qt.AltModifier: key_string = u'Alt+' + key_string if event.modifiers() & Qt.ShiftModifier == Qt.ShiftModifier: - key_string = u'Shift+' + key_string; + key_string = u'Shift+' + key_string key_sequence = QtGui.QKeySequence(key_string) existing_key = QtGui.QKeySequence("Ctrl+Shift+F8") if key_sequence == existing_key: diff --git a/openlp/core/utils/actions.py b/openlp/core/utils/actions.py index 893e4adba..31afe93d1 100644 --- a/openlp/core/utils/actions.py +++ b/openlp/core/utils/actions.py @@ -79,7 +79,7 @@ class CategoryActionList(object): """ return self.__next__() - def has_key(key): + def has_key(self, key): for weight, action in self.actions: if action.text() == key: return True @@ -144,7 +144,7 @@ class CategoryList(object): return True return False - def append(self, name, actions=[]): + def append(self, name, actions=None): weight = 0 if len(self.categories) > 0: weight = self.categories[-1].weight + 1 @@ -153,7 +153,7 @@ class CategoryList(object): else: self.add(name, weight) - def add(self, name, weight=0, actions=[]): + def add(self, name, weight=0, actions=None): category = ActionCategory(name, weight) if actions: for action in actions: diff --git a/openlp/plugins/alerts/alertsplugin.py b/openlp/plugins/alerts/alertsplugin.py index 15b1ed6f9..fbd51a13a 100644 --- a/openlp/plugins/alerts/alertsplugin.py +++ b/openlp/plugins/alerts/alertsplugin.py @@ -85,7 +85,11 @@ class AlertsPlugin(Plugin): self.liveController.alertTab = self.alertsTab def finalise(self): + """ + Tidy up on exit + """ log.info(u'Alerts Finalising') + self.manager.finalise() Plugin.finalise(self) self.toolsAlertItem.setVisible(False) @@ -117,11 +121,3 @@ class AlertsPlugin(Plugin): self.textStrings[StringContent.VisibleName] = { u'title': translate('AlertsPlugin', 'Alerts') } - - def finalise(self): - """ - Time to tidy up on exit - """ - log.info(u'Alerts Finalising') - self.manager.finalise() - Plugin.finalise(self) diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py index 946b4ab93..42976cde6 100644 --- a/openlp/plugins/bibles/bibleplugin.py +++ b/openlp/plugins/bibles/bibleplugin.py @@ -52,7 +52,11 @@ class BiblePlugin(Plugin): self.exportBibleItem.setVisible(True) def finalise(self): + """ + Tidy up on exit + """ log.info(u'Plugin Finalise') + self.manager.finalise() Plugin.finalise(self) self.importBibleItem.setVisible(False) self.exportBibleItem.setVisible(False) @@ -172,11 +176,3 @@ class BiblePlugin(Plugin): u'tooltip': translate('BiblesPlugin', 'Add the selected Bible to the service') } - - def finalise(self): - """ - Time to tidy up on exit - """ - log.info(u'Bible Finalising') - self.manager.finalise() - Plugin.finalise(self) diff --git a/openlp/plugins/songs/lib/cclifileimport.py b/openlp/plugins/songs/lib/cclifileimport.py index 669201325..207756e4b 100755 --- a/openlp/plugins/songs/lib/cclifileimport.py +++ b/openlp/plugins/songs/lib/cclifileimport.py @@ -203,9 +203,9 @@ class CCLIFileImport(SongImport): SongSelect .txt file format:: - Song Title # Contains the song title + Song Title # Contains the song title - Verse type and number # e.g. Verse 1, Chorus 1 + Verse type and number # e.g. Verse 1, Chorus 1 Verse lyrics @@ -213,12 +213,16 @@ class CCLIFileImport(SongImport): Verse lyrics - Song CCLI number # e.g. CCLI Number (e.g.CCLI-Liednummer: 2672885) - Song copyright # e.g. © 1999 Integrity's Hosanna! Music | LenSongs Publishing - Song authors # e.g. Lenny LeBlanc | Paul Baloche - Licencing info # e.g. For use solely with the SongSelect Terms of Use. + Song CCLI number + # e.g. CCLI Number (e.g.CCLI-Liednummer: 2672885) + Song copyright + # e.g. © 1999 Integrity's Hosanna! Music | LenSongs Publishing + Song authors # e.g. Lenny LeBlanc | Paul Baloche + Licencing info + # e.g. For use solely with the SongSelect Terms of Use. All rights Reserved. www.ccli.com - CCLI Licence number of user # e.g. CCL-Liedlizenznummer: 14 / CCLI License No. 14 + CCLI Licence number of user + # e.g. CCL-Liedlizenznummer: 14 / CCLI License No. 14 """ log.debug(u'TXT file text: %s', textList) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index a211344c2..63496affd 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -389,7 +389,8 @@ class SongMediaItem(MediaManagerItem): service_item.audit = [ song.title, author_audit, song.copyright, unicode(song.ccli_number) ] - service_item.data_string = {u'title':song.search_title, u'authors':author_list} + service_item.data_string = {u'title':song.search_title, + u'authors':author_list} return True def serviceLoad(self, item): @@ -409,7 +410,7 @@ class SongMediaItem(MediaManagerItem): count = 0 for author in song.authors: if author.display_name in author_list: - count += 1 + count += 1 if count == len(author_list): editId = song.id uuid = item._uuid diff --git a/openlp/plugins/songusage/songusageplugin.py b/openlp/plugins/songusage/songusageplugin.py index 124fe2863..a4081a10c 100644 --- a/openlp/plugins/songusage/songusageplugin.py +++ b/openlp/plugins/songusage/songusageplugin.py @@ -29,7 +29,8 @@ from datetime import datetime from PyQt4 import QtCore, QtGui -from openlp.core.lib import Plugin, StringContent, Receiver, build_icon, translate +from openlp.core.lib import Plugin, StringContent, Receiver, build_icon, \ + translate from openlp.core.lib.db import Manager from openlp.plugins.songusage.forms import SongUsageDetailForm, \ SongUsageDeleteForm @@ -123,7 +124,12 @@ class SongUsagePlugin(Plugin): self.SongUsageMenu.menuAction().setVisible(True) def finalise(self): + """ + Tidy up on exit + """ log.info(u'Plugin Finalise') + self.manager.finalise() + Plugin.finalise(self) self.SongUsageMenu.menuAction().setVisible(False) #stop any events being processed self.SongUsageActive = False @@ -176,11 +182,3 @@ class SongUsagePlugin(Plugin): self.textStrings[StringContent.VisibleName] = { u'title': translate('SongUsagePlugin', 'SongUsage') } - - def finalise(self): - """ - Time to tidy up on exit - """ - log.info(u'SongUsage Finalising') - self.manager.finalise() - Plugin.finalise(self)