forked from openlp/openlp
Cleanups
This commit is contained in:
parent
a1d2e8390b
commit
b7dd528d50
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -203,9 +203,9 @@ class CCLIFileImport(SongImport):
|
||||
|
||||
SongSelect .txt file format::
|
||||
|
||||
Song Title # Contains the song title
|
||||
Song Title # Contains the song title
|
||||
<Empty line>
|
||||
Verse type and number # e.g. Verse 1, Chorus 1
|
||||
Verse type and number # e.g. Verse 1, Chorus 1
|
||||
Verse lyrics
|
||||
<Empty line>
|
||||
<Empty line>
|
||||
@ -213,12 +213,16 @@ class CCLIFileImport(SongImport):
|
||||
Verse lyrics
|
||||
<Empty line>
|
||||
<Empty line>
|
||||
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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user