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:
|
if event.modifiers() & Qt.AltModifier == Qt.AltModifier:
|
||||||
key_string = u'Alt+' + key_string
|
key_string = u'Alt+' + key_string
|
||||||
if event.modifiers() & Qt.ShiftModifier == Qt.ShiftModifier:
|
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)
|
key_sequence = QtGui.QKeySequence(key_string)
|
||||||
existing_key = QtGui.QKeySequence("Ctrl+Shift+F8")
|
existing_key = QtGui.QKeySequence("Ctrl+Shift+F8")
|
||||||
if key_sequence == existing_key:
|
if key_sequence == existing_key:
|
||||||
|
@ -79,7 +79,7 @@ class CategoryActionList(object):
|
|||||||
"""
|
"""
|
||||||
return self.__next__()
|
return self.__next__()
|
||||||
|
|
||||||
def has_key(key):
|
def has_key(self, key):
|
||||||
for weight, action in self.actions:
|
for weight, action in self.actions:
|
||||||
if action.text() == key:
|
if action.text() == key:
|
||||||
return True
|
return True
|
||||||
@ -144,7 +144,7 @@ class CategoryList(object):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def append(self, name, actions=[]):
|
def append(self, name, actions=None):
|
||||||
weight = 0
|
weight = 0
|
||||||
if len(self.categories) > 0:
|
if len(self.categories) > 0:
|
||||||
weight = self.categories[-1].weight + 1
|
weight = self.categories[-1].weight + 1
|
||||||
@ -153,7 +153,7 @@ class CategoryList(object):
|
|||||||
else:
|
else:
|
||||||
self.add(name, weight)
|
self.add(name, weight)
|
||||||
|
|
||||||
def add(self, name, weight=0, actions=[]):
|
def add(self, name, weight=0, actions=None):
|
||||||
category = ActionCategory(name, weight)
|
category = ActionCategory(name, weight)
|
||||||
if actions:
|
if actions:
|
||||||
for action in actions:
|
for action in actions:
|
||||||
|
@ -85,7 +85,11 @@ class AlertsPlugin(Plugin):
|
|||||||
self.liveController.alertTab = self.alertsTab
|
self.liveController.alertTab = self.alertsTab
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
|
"""
|
||||||
|
Tidy up on exit
|
||||||
|
"""
|
||||||
log.info(u'Alerts Finalising')
|
log.info(u'Alerts Finalising')
|
||||||
|
self.manager.finalise()
|
||||||
Plugin.finalise(self)
|
Plugin.finalise(self)
|
||||||
self.toolsAlertItem.setVisible(False)
|
self.toolsAlertItem.setVisible(False)
|
||||||
|
|
||||||
@ -117,11 +121,3 @@ class AlertsPlugin(Plugin):
|
|||||||
self.textStrings[StringContent.VisibleName] = {
|
self.textStrings[StringContent.VisibleName] = {
|
||||||
u'title': translate('AlertsPlugin', 'Alerts')
|
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)
|
self.exportBibleItem.setVisible(True)
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
|
"""
|
||||||
|
Tidy up on exit
|
||||||
|
"""
|
||||||
log.info(u'Plugin Finalise')
|
log.info(u'Plugin Finalise')
|
||||||
|
self.manager.finalise()
|
||||||
Plugin.finalise(self)
|
Plugin.finalise(self)
|
||||||
self.importBibleItem.setVisible(False)
|
self.importBibleItem.setVisible(False)
|
||||||
self.exportBibleItem.setVisible(False)
|
self.exportBibleItem.setVisible(False)
|
||||||
@ -172,11 +176,3 @@ class BiblePlugin(Plugin):
|
|||||||
u'tooltip': translate('BiblesPlugin',
|
u'tooltip': translate('BiblesPlugin',
|
||||||
'Add the selected Bible to the service')
|
'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::
|
SongSelect .txt file format::
|
||||||
|
|
||||||
Song Title # Contains the song title
|
Song Title # Contains the song title
|
||||||
<Empty line>
|
<Empty line>
|
||||||
Verse type and number # e.g. Verse 1, Chorus 1
|
Verse type and number # e.g. Verse 1, Chorus 1
|
||||||
Verse lyrics
|
Verse lyrics
|
||||||
<Empty line>
|
<Empty line>
|
||||||
<Empty line>
|
<Empty line>
|
||||||
@ -213,12 +213,16 @@ class CCLIFileImport(SongImport):
|
|||||||
Verse lyrics
|
Verse lyrics
|
||||||
<Empty line>
|
<Empty line>
|
||||||
<Empty line>
|
<Empty line>
|
||||||
Song CCLI number # e.g. CCLI Number (e.g.CCLI-Liednummer: 2672885)
|
Song CCLI number
|
||||||
Song copyright # e.g. © 1999 Integrity's Hosanna! Music | LenSongs Publishing
|
# e.g. CCLI Number (e.g.CCLI-Liednummer: 2672885)
|
||||||
Song authors # e.g. Lenny LeBlanc | Paul Baloche
|
Song copyright
|
||||||
Licencing info # e.g. For use solely with the SongSelect Terms of Use.
|
# 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
|
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)
|
log.debug(u'TXT file text: %s', textList)
|
||||||
|
@ -389,7 +389,8 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
service_item.audit = [
|
service_item.audit = [
|
||||||
song.title, author_audit, song.copyright, unicode(song.ccli_number)
|
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
|
return True
|
||||||
|
|
||||||
def serviceLoad(self, item):
|
def serviceLoad(self, item):
|
||||||
@ -409,7 +410,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
count = 0
|
count = 0
|
||||||
for author in song.authors:
|
for author in song.authors:
|
||||||
if author.display_name in author_list:
|
if author.display_name in author_list:
|
||||||
count += 1
|
count += 1
|
||||||
if count == len(author_list):
|
if count == len(author_list):
|
||||||
editId = song.id
|
editId = song.id
|
||||||
uuid = item._uuid
|
uuid = item._uuid
|
||||||
|
@ -29,7 +29,8 @@ from datetime import datetime
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
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.core.lib.db import Manager
|
||||||
from openlp.plugins.songusage.forms import SongUsageDetailForm, \
|
from openlp.plugins.songusage.forms import SongUsageDetailForm, \
|
||||||
SongUsageDeleteForm
|
SongUsageDeleteForm
|
||||||
@ -123,7 +124,12 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.SongUsageMenu.menuAction().setVisible(True)
|
self.SongUsageMenu.menuAction().setVisible(True)
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
|
"""
|
||||||
|
Tidy up on exit
|
||||||
|
"""
|
||||||
log.info(u'Plugin Finalise')
|
log.info(u'Plugin Finalise')
|
||||||
|
self.manager.finalise()
|
||||||
|
Plugin.finalise(self)
|
||||||
self.SongUsageMenu.menuAction().setVisible(False)
|
self.SongUsageMenu.menuAction().setVisible(False)
|
||||||
#stop any events being processed
|
#stop any events being processed
|
||||||
self.SongUsageActive = False
|
self.SongUsageActive = False
|
||||||
@ -176,11 +182,3 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.textStrings[StringContent.VisibleName] = {
|
self.textStrings[StringContent.VisibleName] = {
|
||||||
u'title': translate('SongUsagePlugin', 'SongUsage')
|
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