diff --git a/copyright.txt b/copyright.txt
index 64d028205..6b241e7fc 100644
--- a/copyright.txt
+++ b/copyright.txt
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
diff --git a/openlp.py b/openlp.py
index dad5d0212..8a53fe965 100755
--- a/openlp.py
+++ b/openlp.py
@@ -5,8 +5,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Edwin Lunando, Joshua Miller, Stevan Pettit, #
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
diff --git a/openlp/__init__.py b/openlp/__init__.py
index 244d4b587..ac5f063d4 100644
--- a/openlp/__init__.py
+++ b/openlp/__init__.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py
index 4bb0f0d28..70821b6e3 100644
--- a/openlp/core/__init__.py
+++ b/openlp/core/__init__.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
diff --git a/openlp/core/common/__init__.py b/openlp/core/common/__init__.py
index 42fde7065..c0838833f 100644
--- a/openlp/core/common/__init__.py
+++ b/openlp/core/common/__init__.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
diff --git a/openlp/core/common/applocation.py b/openlp/core/common/applocation.py
index 41b47ecbe..ed04b2c00 100644
--- a/openlp/core/common/applocation.py
+++ b/openlp/core/common/applocation.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
diff --git a/openlp/core/common/settings.py b/openlp/core/common/settings.py
index 0b5aebc69..15a272e4b 100644
--- a/openlp/core/common/settings.py
+++ b/openlp/core/common/settings.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
@@ -172,46 +172,46 @@ class Settings(QtCore.QSettings):
'shortcuts/importBibleItem': [],
'shortcuts/listViewBiblesDeleteItem': [QtGui.QKeySequence(QtCore.Qt.Key_Delete)],
'shortcuts/listViewBiblesPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Return)],
'shortcuts/listViewBiblesLiveItem': [QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
'shortcuts/listViewBiblesServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
- QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
'shortcuts/listViewCustomDeleteItem': [QtGui.QKeySequence(QtCore.Qt.Key_Delete)],
'shortcuts/listViewCustomPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Return)],
'shortcuts/listViewCustomLiveItem': [QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
'shortcuts/listViewCustomServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
- QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
'shortcuts/listViewImagesDeleteItem': [QtGui.QKeySequence(QtCore.Qt.Key_Delete)],
'shortcuts/listViewImagesPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Return)],
'shortcuts/listViewImagesLiveItem': [QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
'shortcuts/listViewImagesServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
- QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
'shortcuts/listViewMediaDeleteItem': [QtGui.QKeySequence(QtCore.Qt.Key_Delete)],
'shortcuts/listViewMediaPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Return)],
'shortcuts/listViewMediaLiveItem': [QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
'shortcuts/listViewMediaServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
- QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
'shortcuts/listViewPresentationsDeleteItem': [QtGui.QKeySequence(QtCore.Qt.Key_Delete)],
'shortcuts/listViewPresentationsPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Return)],
'shortcuts/listViewPresentationsLiveItem': [QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
'shortcuts/listViewPresentationsServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
- QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
'shortcuts/listViewSongsDeleteItem': [QtGui.QKeySequence(QtCore.Qt.Key_Delete)],
'shortcuts/listViewSongsPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Return)],
'shortcuts/listViewSongsLiveItem': [QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter),
- QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
+ QtGui.QKeySequence(QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return)],
'shortcuts/listViewSongsServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
- QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
+ QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
'shortcuts/lockPanel': [],
'shortcuts/modeDefaultItem': [],
'shortcuts/modeLiveItem': [],
@@ -222,8 +222,7 @@ class Settings(QtCore.QSettings):
'shortcuts/moveBottom': [QtGui.QKeySequence(QtCore.Qt.Key_End)],
'shortcuts/moveDown': [QtGui.QKeySequence(QtCore.Qt.Key_PageDown)],
'shortcuts/nextTrackItem': [],
- 'shortcuts/nextItem_live': [QtGui.QKeySequence(QtCore.Qt.Key_Down),
- QtGui.QKeySequence(QtCore.Qt.Key_PageDown)],
+ 'shortcuts/nextItem_live': [QtGui.QKeySequence(QtCore.Qt.Key_Down), QtGui.QKeySequence(QtCore.Qt.Key_PageDown)],
'shortcuts/nextItem_preview': [],
'shortcuts/nextService': [QtGui.QKeySequence(QtCore.Qt.Key_Right)],
'shortcuts/newService': [],
@@ -231,8 +230,7 @@ class Settings(QtCore.QSettings):
'shortcuts/onlineHelpItem': [QtGui.QKeySequence('Alt+F1')],
'shortcuts/openService': [],
'shortcuts/saveService': [],
- 'shortcuts/previousItem_live': [QtGui.QKeySequence(QtCore.Qt.Key_Up),
- QtGui.QKeySequence(QtCore.Qt.Key_PageUp)],
+ 'shortcuts/previousItem_live': [QtGui.QKeySequence(QtCore.Qt.Key_Up), QtGui.QKeySequence(QtCore.Qt.Key_PageUp)],
'shortcuts/playbackPause': [],
'shortcuts/playbackPlay': [],
'shortcuts/playbackStop': [],
diff --git a/openlp/core/common/uistrings.py b/openlp/core/common/uistrings.py
index 7368e5011..6bb44150c 100644
--- a/openlp/core/common/uistrings.py
+++ b/openlp/core/common/uistrings.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py
index a46e25249..efdbc97f8 100644
--- a/openlp/core/lib/__init__.py
+++ b/openlp/core/lib/__init__.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
@@ -273,7 +273,7 @@ def check_item_selected(list_widget, message):
"""
if not list_widget.selectedIndexes():
QtGui.QMessageBox.information(list_widget.parent(),
- translate('OpenLP.MediaManagerItem', 'No Items Selected'), message)
+ translate('OpenLP.MediaManagerItem', 'No Items Selected'), message)
return False
return True
@@ -319,13 +319,13 @@ def create_separated_list(string_list):
return string_list[0]
elif len(string_list) == 2:
return translate('OpenLP.core.lib', '%s and %s',
- 'Locale list separator: 2 items') % (string_list[0], string_list[1])
+ 'Locale list separator: 2 items') % (string_list[0], string_list[1])
else:
merged = translate('OpenLP.core.lib', '%s, and %s',
- 'Locale list separator: end') % (string_list[-2], string_list[-1])
+ 'Locale list separator: end') % (string_list[-2], string_list[-1])
for index in reversed(list(range(1, len(string_list) - 2))):
merged = translate('OpenLP.core.lib', '%s, %s',
- 'Locale list separator: middle') % (string_list[index], merged)
+ 'Locale list separator: middle') % (string_list[index], merged)
return translate('OpenLP.core.lib', '%s, %s', 'Locale list separator: start') % (string_list[0], merged)
diff --git a/openlp/core/lib/db.py b/openlp/core/lib/db.py
index 429c30262..7e573ae2e 100644
--- a/openlp/core/lib/db.py
+++ b/openlp/core/lib/db.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
@@ -97,8 +97,8 @@ def upgrade_db(url, upgrade):
pass
metadata_table = Table('metadata', metadata,
- Column('key', types.Unicode(64), primary_key=True),
- Column('value', types.UnicodeText(), default=None)
+ Column('key', types.Unicode(64), primary_key=True),
+ Column('value', types.UnicodeText(), default=None)
)
metadata_table.create(checkfirst=True)
mapper(Metadata, metadata_table)
@@ -199,11 +199,10 @@ class Manager(object):
else:
self.db_url = 'sqlite:///%s/%s.sqlite' % (AppLocation.get_section_data_path(plugin_name), plugin_name)
else:
- self.db_url = '%s://%s:%s@%s/%s' % (db_type,
- urlquote(settings.value('db username')),
- urlquote(settings.value('db password')),
- urlquote(settings.value('db hostname')),
- urlquote(settings.value('db database')))
+ self.db_url = '%s://%s:%s@%s/%s' % (db_type, urlquote(settings.value('db username')),
+ urlquote(settings.value('db password')),
+ urlquote(settings.value('db hostname')),
+ urlquote(settings.value('db database')))
if db_type == 'mysql':
db_encoding = settings.value('db encoding')
self.db_url += '?charset=%s' % urlquote(db_encoding)
@@ -214,18 +213,17 @@ class Manager(object):
critical_error_message_box(
translate('OpenLP.Manager', 'Database Error'),
translate('OpenLP.Manager', 'The database being loaded was created in a more recent version of '
- 'OpenLP. The database is version %d, while OpenLP expects version %d. The database will not '
- 'be loaded.\n\nDatabase: %s') % (db_ver, up_ver, self.db_url)
+ 'OpenLP. The database is version %d, while OpenLP expects version %d. The database will '
+ 'not be loaded.\n\nDatabase: %s') % (db_ver, up_ver, self.db_url)
)
return
try:
self.session = init_schema(self.db_url)
except (SQLAlchemyError, DBAPIError):
log.exception('Error loading database: %s', self.db_url)
- critical_error_message_box(
- translate('OpenLP.Manager', 'Database Error'),
- translate('OpenLP.Manager', 'OpenLP cannot load your database.\n\nDatabase: %s') % self.db_url
- )
+ critical_error_message_box(translate('OpenLP.Manager', 'Database Error'),
+ translate('OpenLP.Manager', 'OpenLP cannot load your database.\n\nDatabase: %s')
+ % self.db_url)
def save_object(self, object_instance, commit=True):
"""
diff --git a/openlp/core/lib/dockwidget.py b/openlp/core/lib/dockwidget.py
index 61091cb84..5e2bad479 100644
--- a/openlp/core/lib/dockwidget.py
+++ b/openlp/core/lib/dockwidget.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
diff --git a/openlp/core/lib/filedialog.py b/openlp/core/lib/filedialog.py
index bac1b5ce2..989bafa6b 100644
--- a/openlp/core/lib/filedialog.py
+++ b/openlp/core/lib/filedialog.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
@@ -40,6 +40,7 @@ from openlp.core.common import UiStrings
log = logging.getLogger(__name__)
+
class FileDialog(QtGui.QFileDialog):
"""
Subclass QFileDialog to work round a bug
@@ -54,13 +55,12 @@ class FileDialog(QtGui.QFileDialog):
file_list = []
for file in files:
if not os.path.exists(file):
- log.info('File %s not found. Attempting to unquote.')
+ log.info('File not found. Attempting to unquote.')
file = parse.unquote(file)
if not os.path.exists(file):
log.error('File %s not found.' % file)
QtGui.QMessageBox.information(parent, UiStrings().FileNotFound,
- UiStrings().FileNotFoundMessage % file)
+ UiStrings().FileNotFoundMessage % file)
continue
- log.info('File %s found.')
file_list.append(file)
return file_list
\ No newline at end of file
diff --git a/openlp/core/lib/formattingtags.py b/openlp/core/lib/formattingtags.py
index 58e3226d1..db6213462 100644
--- a/openlp/core/lib/formattingtags.py
+++ b/openlp/core/lib/formattingtags.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
@@ -68,47 +68,56 @@ class FormattingTags(object):
FormattingTags.html_expands = []
base_tags = []
# Append the base tags.
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'Red'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'Red'),
'start tag': '{r}',
'start html': '',
'end tag': '{/r}', 'end html': '', 'protected': True,
'temporary': False})
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'Black'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'Black'),
'start tag': '{b}',
'start html': '',
'end tag': '{/b}', 'end html': '', 'protected': True,
'temporary': False})
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'Blue'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'Blue'),
'start tag': '{bl}',
'start html': '',
'end tag': '{/bl}', 'end html': '', 'protected': True,
'temporary': False})
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'Yellow'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'Yellow'),
'start tag': '{y}',
'start html': '',
'end tag': '{/y}', 'end html': '', 'protected': True,
'temporary': False})
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'Green'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'Green'),
'start tag': '{g}',
'start html': '',
'end tag': '{/g}', 'end html': '', 'protected': True,
'temporary': False})
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'Pink'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'Pink'),
'start tag': '{pk}',
'start html': '',
'end tag': '{/pk}', 'end html': '', 'protected': True,
'temporary': False})
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'Orange'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'Orange'),
'start tag': '{o}',
'start html': '',
'end tag': '{/o}', 'end html': '', 'protected': True,
'temporary': False})
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'Purple'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'Purple'),
'start tag': '{pp}',
'start html': '',
'end tag': '{/pp}', 'end html': '', 'protected': True,
'temporary': False})
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'White'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'White'),
'start tag': '{w}',
'start html': '',
'end tag': '{/w}', 'end html': '', 'protected': True,
@@ -128,7 +137,8 @@ class FormattingTags(object):
'start tag': '{p}', 'start html': '
', 'end tag': '{/p}',
'end html': '
', 'protected': True,
'temporary': False})
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'Bold'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'Bold'),
'start tag': '{st}', 'start html': '',
'end tag': '{/st}', 'end html': '',
'protected': True, 'temporary': False})
@@ -142,9 +152,11 @@ class FormattingTags(object):
'start html': '',
'end tag': '{/u}', 'end html': '', 'protected': True,
'temporary': False})
- base_tags.append({'desc': translate('OpenLP.FormattingTags', 'Break'),
+ base_tags.append({
+ 'desc': translate('OpenLP.FormattingTags', 'Break'),
'start tag': '{br}', 'start html': '
', 'end tag': '',
- 'end html': '', 'protected': True, 'temporary': False})
+ 'end html': '', 'protected': True,
+ 'temporary': False})
FormattingTags.add_html_tags(base_tags)
FormattingTags.add_html_tags(temporary_tags)
user_expands_string = str(Settings().value('formattingTags/html_tags'))
diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py
index 07a83f336..b85c76955 100644
--- a/openlp/core/lib/htmlbuilder.py
+++ b/openlp/core/lib/htmlbuilder.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
@@ -576,7 +576,7 @@ def build_html(item, screen, is_live, background, image=None, plugins=None):
"""
width = screen['size'].width()
height = screen['size'].height()
- theme_data = item.themedata
+ theme_data = item.theme_data
# Image generated and poked in
if background:
bgimage_src = 'src="data:image/png;base64,%s"' % background
@@ -630,7 +630,7 @@ def build_background_css(item, width):
Service Item containing theme and location information
"""
width = int(width) // 2
- theme = item.themedata
+ theme = item.theme_data
background = 'background-color: black'
if theme:
if theme.background_type == BackgroundType.to_string(BackgroundType.Transparent):
@@ -681,7 +681,7 @@ def build_lyrics_css(item):
%s
}
"""
- theme_data = item.themedata
+ theme_data = item.theme_data
lyricstable = ''
lyrics = ''
lyricsmain = ''
@@ -769,10 +769,10 @@ def build_footer_css(item, height):
text-align: left;
white-space: nowrap;
"""
- theme = item.themedata
+ theme = item.theme_data
if not theme or not item.footer:
return ''
bottom = height - int(item.footer.y()) - int(item.footer.height())
lyrics_html = style % (item.footer.x(), bottom, item.footer.width(),
- theme.font_footer_name, theme.font_footer_size, theme.font_footer_color)
+ theme.font_footer_name, theme.font_footer_size, theme.font_footer_color)
return lyrics_html
diff --git a/openlp/core/lib/imagemanager.py b/openlp/core/lib/imagemanager.py
index e85f38d64..1531e0396 100644
--- a/openlp/core/lib/imagemanager.py
+++ b/openlp/core/lib/imagemanager.py
@@ -5,8 +5,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
diff --git a/openlp/core/lib/listwidgetwithdnd.py b/openlp/core/lib/listwidgetwithdnd.py
index 964974f3a..c7933452c 100644
--- a/openlp/core/lib/listwidgetwithdnd.py
+++ b/openlp/core/lib/listwidgetwithdnd.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
@@ -45,8 +45,7 @@ class ListWidgetWithDnD(QtGui.QListWidget):
Initialise the list widget
"""
super(ListWidgetWithDnD, self).__init__(parent)
- self.mimeDataText = name
- assert(self.mimeDataText)
+ self.mime_data_text = name
def activateDnD(self):
"""
@@ -54,7 +53,7 @@ class ListWidgetWithDnD(QtGui.QListWidget):
"""
self.setAcceptDrops(True)
self.setDragDropMode(QtGui.QAbstractItemView.DragDrop)
- Registry().register_function(('%s_dnd' % self.mimeDataText), self.parent().load_file)
+ Registry().register_function(('%s_dnd' % self.mime_data_text), self.parent().load_file)
def mouseMoveEvent(self, event):
"""
@@ -68,9 +67,9 @@ class ListWidgetWithDnD(QtGui.QListWidget):
event.ignore()
return
drag = QtGui.QDrag(self)
- mimeData = QtCore.QMimeData()
- drag.setMimeData(mimeData)
- mimeData.setText(self.mimeDataText)
+ mime_data = QtCore.QMimeData()
+ drag.setMimeData(mime_data)
+ mime_data.setText(self.mime_data_text)
drag.start(QtCore.Qt.CopyAction)
def dragEnterEvent(self, event):
@@ -104,13 +103,13 @@ class ListWidgetWithDnD(QtGui.QListWidget):
event.accept()
files = []
for url in event.mimeData().urls():
- localFile = url.toLocalFile()
- if os.path.isfile(localFile):
- files.append(localFile)
- elif os.path.isdir(localFile):
- listing = os.listdir(localFile)
+ local_file = url.toLocalFile()
+ if os.path.isfile(local_file):
+ files.append(local_file)
+ elif os.path.isdir(local_file):
+ listing = os.listdir(local_file)
for file in listing:
- files.append(os.path.join(localFile, file))
- Registry().execute('%s_dnd' % self.mimeDataText, files)
+ files.append(os.path.join(local_file, file))
+ Registry().execute('%s_dnd' % self.mime_data_text, files)
else:
event.ignore()
diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py
index 22f03355f..09a25c9b0 100644
--- a/openlp/core/lib/mediamanageritem.py
+++ b/openlp/core/lib/mediamanageritem.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
@@ -171,7 +171,7 @@ class MediaManagerItem(QtGui.QWidget):
## Import Button ##
if self.has_import_icon:
toolbar_actions.append(['Import', StringContent.Import,
- ':/general/general_import.png', self.on_import_click])
+ ':/general/general_import.png', self.on_import_click])
## Load Button ##
if self.has_file_icon:
toolbar_actions.append(['Load', StringContent.Load, ':/general/general_open.png', self.on_file_click])
@@ -184,10 +184,10 @@ class MediaManagerItem(QtGui.QWidget):
## Delete Button ##
if self.has_delete_icon:
toolbar_actions.append(['Delete', StringContent.Delete,
- ':/general/general_delete.png', self.on_delete_click])
+ ':/general/general_delete.png', self.on_delete_click])
## Preview ##
toolbar_actions.append(['Preview', StringContent.Preview,
- ':/general/general_preview.png', self.on_preview_click])
+ ':/general/general_preview.png', self.on_preview_click])
## Live Button ##
toolbar_actions.append(['Live', StringContent.Live, ':/general/general_live.png', self.on_live_click])
## Add to service Button ##
@@ -196,9 +196,9 @@ class MediaManagerItem(QtGui.QWidget):
if action[0] == StringContent.Preview:
self.toolbar.addSeparator()
self.toolbar.add_toolbar_action('%s%sAction' % (self.plugin.name, action[0]),
- text=self.plugin.get_string(action[1])['title'], icon=action[2],
- tooltip=self.plugin.get_string(action[1])['tooltip'],
- triggers=action[3])
+ text=self.plugin.get_string(action[1])['title'], icon=action[2],
+ tooltip=self.plugin.get_string(action[1])['tooltip'],
+ triggers=action[3])
def add_list_view_to_toolbar(self):
"""
@@ -216,41 +216,41 @@ class MediaManagerItem(QtGui.QWidget):
self.list_view.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
if self.has_edit_icon:
create_widget_action(self.list_view,
- text=self.plugin.get_string(StringContent.Edit)['title'],
- icon=':/general/general_edit.png',
- triggers=self.on_edit_click)
+ text=self.plugin.get_string(StringContent.Edit)['title'],
+ icon=':/general/general_edit.png',
+ triggers=self.on_edit_click)
create_widget_action(self.list_view, separator=True)
if self.has_delete_icon:
create_widget_action(self.list_view,
- 'listView%s%sItem' % (self.plugin.name.title(), StringContent.Delete.title()),
- text=self.plugin.get_string(StringContent.Delete)['title'],
- icon=':/general/general_delete.png',
- can_shortcuts=True, triggers=self.on_delete_click)
+ 'listView%s%sItem' % (self.plugin.name.title(), StringContent.Delete.title()),
+ text=self.plugin.get_string(StringContent.Delete)['title'],
+ icon=':/general/general_delete.png',
+ can_shortcuts=True, triggers=self.on_delete_click)
create_widget_action(self.list_view, separator=True)
create_widget_action(self.list_view,
- 'listView%s%sItem' % (self.plugin.name.title(), StringContent.Preview.title()),
- text=self.plugin.get_string(StringContent.Preview)['title'],
- icon=':/general/general_preview.png',
- can_shortcuts=True,
- triggers=self.on_preview_click)
+ 'listView%s%sItem' % (self.plugin.name.title(), StringContent.Preview.title()),
+ text=self.plugin.get_string(StringContent.Preview)['title'],
+ icon=':/general/general_preview.png',
+ can_shortcuts=True,
+ triggers=self.on_preview_click)
create_widget_action(self.list_view,
- 'listView%s%sItem' % (self.plugin.name.title(), StringContent.Live.title()),
- text=self.plugin.get_string(StringContent.Live)['title'],
- icon=':/general/general_live.png',
- can_shortcuts=True,
- triggers=self.on_live_click)
+ 'listView%s%sItem' % (self.plugin.name.title(), StringContent.Live.title()),
+ text=self.plugin.get_string(StringContent.Live)['title'],
+ icon=':/general/general_live.png',
+ can_shortcuts=True,
+ triggers=self.on_live_click)
create_widget_action(self.list_view,
- 'listView%s%sItem' % (self.plugin.name.title(), StringContent.Service.title()),
- can_shortcuts=True,
- text=self.plugin.get_string(StringContent.Service)['title'],
- icon=':/general/general_add.png',
- triggers=self.on_add_click)
+ 'listView%s%sItem' % (self.plugin.name.title(), StringContent.Service.title()),
+ can_shortcuts=True,
+ text=self.plugin.get_string(StringContent.Service)['title'],
+ icon=':/general/general_add.png',
+ triggers=self.on_add_click)
if self.add_to_service_item:
create_widget_action(self.list_view, separator=True)
create_widget_action(self.list_view,
- text=translate('OpenLP.MediaManagerItem', '&Add to selected Service Item'),
- icon=':/general/general_add.png',
- triggers=self.on_add_edit_click)
+ text=translate('OpenLP.MediaManagerItem', '&Add to selected Service Item'),
+ icon=':/general/general_add.png',
+ triggers=self.on_add_edit_click)
self.add_custom_context_actions()
# Create the context menu and add all actions from the list_view.
self.menu = QtGui.QMenu()
@@ -291,21 +291,21 @@ class MediaManagerItem(QtGui.QWidget):
def add_custom_context_actions(self):
"""
- Implement this method in your descendent media manager item to
- add any context menu items. This method is called automatically.
+ Implement this method in your descendant media manager item to add any context menu items.
+ This method is called automatically.
"""
pass
def initialise(self):
"""
- Implement this method in your descendent media manager item to
- do any UI or other initialisation. This method is called automatically.
+ Implement this method in your descendant media manager item to do any UI or other initialisation.
+ This method is called automatically.
"""
pass
def add_start_header_bar(self):
"""
- Slot at start of toolbar for plugin to addwidgets
+ Slot at start of toolbar for plugin to add widgets
"""
pass
@@ -320,8 +320,9 @@ class MediaManagerItem(QtGui.QWidget):
Add a file to the list widget to make it available for showing
"""
files = FileDialog.getOpenFileNames(self, self.on_new_prompt,
- Settings().value(self.settings_section + '/last directory'), self.on_new_file_masks)
- log.info('New files(s) %s', files)
+ Settings().value(self.settings_section + '/last directory'),
+ self.on_new_file_masks)
+ log.info('New files(s) %s' % files)
if files:
self.application.set_busy_cursor()
self.validate_and_load(files)
@@ -341,7 +342,8 @@ class MediaManagerItem(QtGui.QWidget):
if file_type.lower() not in self.on_new_file_masks:
if not error_shown:
critical_error_message_box(translate('OpenLP.MediaManagerItem', 'Invalid File Type'),
- translate('OpenLP.MediaManagerItem', 'Invalid File %s.\nSuffix not supported') % file_name)
+ translate('OpenLP.MediaManagerItem',
+ 'Invalid File %s.\nSuffix not supported') % file_name)
error_shown = True
else:
new_files.append(file_name)
@@ -391,7 +393,8 @@ class MediaManagerItem(QtGui.QWidget):
Settings().setValue('%s/%s files' % (self.settings_section, self.settings_section), self.get_file_list())
if duplicates_found:
critical_error_message_box(UiStrings().Duplicate,
- translate('OpenLP.MediaManagerItem', 'Duplicate files were found on import and were ignored.'))
+ translate('OpenLP.MediaManagerItem',
+ 'Duplicate files were found on import and were ignored.'))
def context_menu(self, point):
"""
@@ -411,12 +414,12 @@ class MediaManagerItem(QtGui.QWidget):
"""
file_list = []
for index in range(self.list_view.count()):
- bitem = self.list_view.item(index)
- filename = bitem.data(QtCore.Qt.UserRole)
+ list_item = self.list_view.item(index)
+ filename = list_item.data(QtCore.Qt.UserRole)
file_list.append(filename)
return file_list
- def load_list(self, list, target_group):
+ def load_list(self, load_list, target_group):
"""
Load a list. Needs to be implemented by the plugin.
"""
@@ -448,7 +451,7 @@ class MediaManagerItem(QtGui.QWidget):
pass
def generate_slide_data(self, service_item, item=None, xml_version=False, remote=False,
- context=ServiceItemContext.Live):
+ context=ServiceItemContext.Live):
"""
Generate the slide data. Needs to be implemented by the plugin.
"""
@@ -477,9 +480,10 @@ class MediaManagerItem(QtGui.QWidget):
"""
if not self.list_view.selectedIndexes() and not self.remote_triggered:
QtGui.QMessageBox.information(self, UiStrings().NISp,
- translate('OpenLP.MediaManagerItem', 'You must select one or more items to preview.'))
+ translate('OpenLP.MediaManagerItem',
+ 'You must select one or more items to preview.'))
else:
- log.debug('%s Preview requested', self.plugin.name)
+ log.debug('%s Preview requested' % self.plugin.name)
service_item = self.build_service_item()
if service_item:
service_item.from_plugin = True
@@ -493,7 +497,8 @@ class MediaManagerItem(QtGui.QWidget):
"""
if not self.list_view.selectedIndexes():
QtGui.QMessageBox.information(self, UiStrings().NISp,
- translate('OpenLP.MediaManagerItem', 'You must select one or more items to send live.'))
+ translate('OpenLP.MediaManagerItem',
+ 'You must select one or more items to send live.'))
else:
self.go_live()
@@ -536,7 +541,8 @@ class MediaManagerItem(QtGui.QWidget):
"""
if not self.list_view.selectedIndexes():
QtGui.QMessageBox.information(self, UiStrings().NISp,
- translate('OpenLP.MediaManagerItem', 'You must select one or more items to add.'))
+ translate('OpenLP.MediaManagerItem',
+ 'You must select one or more items to add.'))
else:
# Is it possible to process multiple list items to generate
# multiple service items?
@@ -572,20 +578,22 @@ class MediaManagerItem(QtGui.QWidget):
"""
if not self.list_view.selectedIndexes() and not self.remote_triggered:
QtGui.QMessageBox.information(self, UiStrings().NISp,
- translate('OpenLP.MediaManagerItem', 'You must select one or more items.'))
+ translate('OpenLP.MediaManagerItem', 'You must select one or more items.'))
else:
log.debug('%s Add requested', self.plugin.name)
service_item = self.service_manager.get_service_item()
if not service_item:
QtGui.QMessageBox.information(self, UiStrings().NISs,
- translate('OpenLP.MediaManagerItem', 'You must select an existing service item to add to.'))
+ translate('OpenLP.MediaManagerItem',
+ 'You must select an existing service item to add to.'))
elif self.plugin.name == service_item.name:
self.generate_slide_data(service_item)
self.service_manager.add_service_item(service_item, replace=True)
else:
# Turn off the remote edit update message indicator
QtGui.QMessageBox.information(self, translate('OpenLP.MediaManagerItem', 'Invalid Service Item'),
- translate('OpenLP.MediaManagerItem', 'You must select a %s service item.') % self.title)
+ translate('OpenLP.MediaManagerItem',
+ 'You must select a %s service item.') % self.title)
def build_service_item(self, item=None, xml_version=False, remote=False, context=ServiceItemContext.Live):
"""
diff --git a/openlp/core/lib/plugin.py b/openlp/core/lib/plugin.py
index 2e6f42c6b..09cad17e3 100644
--- a/openlp/core/lib/plugin.py
+++ b/openlp/core/lib/plugin.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
@@ -227,29 +227,29 @@ class Plugin(QtCore.QObject):
"""
pass
- def add_import_menu_item(self, importMenu):
+ def add_import_menu_item(self, import_menu):
"""
Create a menu item and add it to the "Import" menu.
- ``importMenu``
+ ``import_menu``
The Import menu.
"""
pass
- def add_export_menu_Item(self, exportMenu):
+ def add_export_menu_Item(self, export_menu):
"""
Create a menu item and add it to the "Export" menu.
- ``exportMenu``
+ ``export_menu``
The Export menu
"""
pass
- def add_tools_menu_item(self, toolsMenu):
+ def add_tools_menu_item(self, tools_menu):
"""
Create a menu item and add it to the "Tools" menu.
- ``toolsMenu``
+ ``tools_menu``
The Tools menu
"""
pass
@@ -261,7 +261,8 @@ class Plugin(QtCore.QObject):
"""
if self.settings_tab_class:
self.settings_tab = self.settings_tab_class(parent, self.name,
- self.get_string(StringContent.VisibleName)['title'], self.icon_path)
+ self.get_string(StringContent.VisibleName)['title'],
+ self.icon_path)
def add_to_menu(self, menubar):
"""
@@ -324,14 +325,14 @@ class Plugin(QtCore.QObject):
"""
return False
- def rename_theme(self, oldTheme, newTheme):
+ def rename_theme(self, old_theme, new_theme):
"""
Renames a theme a plugin is using making the plugin use the new name.
- ``oldTheme``
+ ``old_theme``
The name of the theme the plugin should stop using.
- ``newTheme``
+ ``new_theme``
The new name the plugin should now use.
"""
pass
@@ -365,9 +366,8 @@ class Plugin(QtCore.QObject):
def __set_name_text_string(self, name, title, tooltip):
"""
- Utility method for creating a plugin's text_strings. This method makes
- use of the singular name of the plugin object so must only be called
- after this has been set.
+ Utility method for creating a plugin's text_strings. This method makes use of the singular name of the
+ plugin object so must only be called after this has been set.
"""
self.text_strings[name] = {'title': title, 'tooltip': tooltip}
diff --git a/openlp/core/lib/pluginmanager.py b/openlp/core/lib/pluginmanager.py
index af7126535..81dc6c328 100644
--- a/openlp/core/lib/pluginmanager.py
+++ b/openlp/core/lib/pluginmanager.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
diff --git a/openlp/core/lib/registry.py b/openlp/core/lib/registry.py
index 7a5f224cb..67c8b4cf1 100644
--- a/openlp/core/lib/registry.py
+++ b/openlp/core/lib/registry.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py
index b743f3962..7f056bb97 100644
--- a/openlp/core/lib/renderer.py
+++ b/openlp/core/lib/renderer.py
@@ -4,8 +4,8 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2013 Raoul Snyman #
-# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
+# Copyright (c) 2008-2014 Raoul Snyman #
+# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
@@ -229,7 +229,7 @@ class Renderer(object):
self.image_manager.add_image(
theme_data.background_filename, ImageSource.Theme, QtGui.QColor(theme_data.background_border_color))
theme_data, main, footer = self.pre_render(theme_data)
- service_item.themedata = theme_data
+ service_item.theme_data = theme_data
service_item.main = main
service_item.footer = footer
service_item.render(True)
@@ -298,7 +298,7 @@ class Renderer(object):
if len(slides) > 1 and text:
# Add all slides apart from the last one the list.
pages.extend(slides[:-1])
- if text_contains_split:
+ if text_contains_split:
text = slides[-1] + '\n[---]\n' + text
else:
text = slides[-1] + '\n' + text
@@ -344,7 +344,7 @@ class Renderer(object):
return QtCore.QRect(10, 0, self.width - 20, self.footer_start)
else:
return QtCore.QRect(theme_data.font_main_x, theme_data.font_main_y,
- theme_data.font_main_width - 1, theme_data.font_main_height - 1)
+ theme_data.font_main_width - 1, theme_data.font_main_height - 1)
def get_footer_rectangle(self, theme_data):
"""
@@ -357,7 +357,8 @@ class Renderer(object):
return QtCore.QRect(10, self.footer_start, self.width - 20, self.height - self.footer_start)
else:
return QtCore.QRect(theme_data.font_footer_x,
- theme_data.font_footer_y, theme_data.font_footer_width - 1, theme_data.font_footer_height - 1)
+ theme_data.font_footer_y, theme_data.font_footer_width - 1,
+ theme_data.font_footer_height - 1)
def _set_text_rectangle(self, theme_data, rect_main, rect_footer):
"""
@@ -400,8 +401,8 @@ class Renderer(object):