openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01942
[Merge] lp:~meths/openlp/trivialfixes into lp:openlp
Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Fixes and cleanups
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/28017
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2010-06-19 04:05:39 +0000
+++ openlp/core/lib/mediamanageritem.py 2010-06-20 14:02:26 +0000
@@ -208,40 +208,40 @@
## Import Button ##
if self.hasImportIcon:
self.addToolbarButton(
- unicode(translate('MediaManagerItem', 'Import %s')) % \
+ unicode(translate('MediaManagerItem', 'Import %s')) %
self.PluginNameShort,
- unicode(translate('MediaManagerItem', 'Import a %s')) % \
+ unicode(translate('MediaManagerItem', 'Import a %s')) %
self.PluginNameVisible,
u':/general/general_import.png', self.onImportClick)
## File Button ##
if self.hasFileIcon:
self.addToolbarButton(
- unicode(translate('MediaManagerItem', 'Load %s')) % \
+ unicode(translate('MediaManagerItem', 'Load %s')) %
self.PluginNameShort,
- unicode(translate('MediaManagerItem', 'Load a new %s')) % \
+ unicode(translate('MediaManagerItem', 'Load a new %s')) %
self.PluginNameVisible,
u':/general/general_open.png', self.onFileClick)
## New Button ##
if self.hasNewIcon:
self.addToolbarButton(
- unicode(translate('MediaManagerItem', 'New %s')) % \
+ unicode(translate('MediaManagerItem', 'New %s')) %
self.PluginNameShort,
- unicode(translate('MediaManagerItem', 'Add a new %s')) % \
+ unicode(translate('MediaManagerItem', 'Add a new %s')) %
self.PluginNameVisible,
u':/general/general_new.png', self.onNewClick)
## Edit Button ##
if self.hasEditIcon:
self.addToolbarButton(
- unicode(translate('MediaManagerItem', 'Edit %s')) % \
+ unicode(translate('MediaManagerItem', 'Edit %s')) %
self.PluginNameShort,
unicode(translate(
- 'MediaManagerItem', 'Edit the selected %s')) % \
+ 'MediaManagerItem', 'Edit the selected %s')) %
self.PluginNameVisible,
u':/general/general_edit.png', self.onEditClick)
## Delete Button ##
if self.hasDeleteIcon:
self.addToolbarButton(
- unicode(translate('MediaManagerItem', 'Delete %s')) % \
+ unicode(translate('MediaManagerItem', 'Delete %s')) %
self.PluginNameShort,
translate('MediaManagerItem', 'Delete the selected item'),
u':/general/general_delete.png', self.onDeleteClick)
@@ -249,7 +249,7 @@
self.addToolbarSeparator()
## Preview ##
self.addToolbarButton(
- unicode(translate('MediaManagerItem', 'Preview %s')) % \
+ unicode(translate('MediaManagerItem', 'Preview %s')) %
self.PluginNameShort,
translate('MediaManagerItem', 'Preview the selected item'),
u':/general/general_preview.png', self.onPreviewClick)
@@ -260,7 +260,7 @@
u':/general/general_live.png', self.onLiveClick)
## Add to service Button ##
self.addToolbarButton(
- unicode(translate('MediaManagerItem', 'Add %s to Service')) % \
+ unicode(translate('MediaManagerItem', 'Add %s to Service')) %
self.PluginNameShort,
translate('MediaManagerItem',
'Add the selected item(s) to the service'),
@@ -285,7 +285,7 @@
self.ListView.addAction(
context_menu_action(
self.ListView, u':/general/general_edit.png',
- unicode(translate('MediaManagerItem', '&Edit %s')) % \
+ unicode(translate('MediaManagerItem', '&Edit %s')) %
self.PluginNameVisible,
self.onEditClick))
self.ListView.addAction(context_menu_separator(self.ListView))
@@ -293,14 +293,14 @@
self.ListView.addAction(
context_menu_action(
self.ListView, u':/general/general_delete.png',
- unicode(translate('MediaManagerItem', '&Delete %s')) % \
+ unicode(translate('MediaManagerItem', '&Delete %s')) %
self.PluginNameVisible,
self.onDeleteClick))
self.ListView.addAction(context_menu_separator(self.ListView))
self.ListView.addAction(
context_menu_action(
self.ListView, u':/general/general_preview.png',
- unicode(translate('MediaManagerItem', '&Preview %s')) % \
+ unicode(translate('MediaManagerItem', '&Preview %s')) %
self.PluginNameVisible,
self.onPreviewClick))
self.ListView.addAction(
=== modified file 'openlp/core/lib/themexmlhandler.py'
--- openlp/core/lib/themexmlhandler.py 2010-06-19 12:01:06 +0000
+++ openlp/core/lib/themexmlhandler.py 2010-06-20 14:02:26 +0000
@@ -339,7 +339,8 @@
"""
Pull out the XML string formatted for human consumption
"""
- return self.theme_xml.toprettyxml(indent=u' ', newl=u'\n', encoding=u'utf-8')
+ return self.theme_xml.toprettyxml(indent=u' ', newl=u'\n',
+ encoding=u'utf-8')
def parse(self, xml):
"""
@@ -364,7 +365,8 @@
``xml``
The XML string to parse.
"""
- theme_xml = ElementTree(element=XML(xml.encode(u'ascii', u'xmlcharrefreplace')))
+ theme_xml = ElementTree(element=XML(xml.encode(u'ascii',
+ u'xmlcharrefreplace')))
xml_iter = theme_xml.getiterator()
master = u''
for element in xml_iter:
=== modified file 'openlp/core/theme/theme.py'
--- openlp/core/theme/theme.py 2010-06-19 10:41:13 +0000
+++ openlp/core/theme/theme.py 2010-06-20 14:02:26 +0000
@@ -175,7 +175,8 @@
``xml``
The data to apply to the theme
"""
- root = ElementTree(element=XML(xml.encode(u'ascii', u'xmlcharrefreplace')))
+ root = ElementTree(element=XML(xml.encode(u'ascii',
+ u'xmlcharrefreplace')))
xml_iter = root.getiterator()
for element in xml_iter:
delphi_color_change = False
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2010-06-20 12:12:49 +0000
+++ openlp/core/ui/servicemanager.py 2010-06-20 14:02:26 +0000
@@ -676,7 +676,7 @@
translate('ServiceManager',
'File is not a valid service.\n'
'The content encoding is not UTF-8.'))
- log.exception(u'Filename "%s" is not valid UTF-8' % \
+ log.exception(u'Filename "%s" is not valid UTF-8' %
file.decode(u'utf-8', u'replace'))
continue
osfile = unicode(QtCore.QDir.toNativeSeparators(ucsfile))
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2010-06-19 10:41:13 +0000
+++ openlp/core/ui/thememanager.py 2010-06-20 14:02:26 +0000
@@ -398,7 +398,7 @@
self, translate('ThemeManager', 'Error'),
translate('ThemeManager', 'File is not a valid theme.\n'
'The content encoding is not UTF-8.'))
- log.exception(u'Filename "%s" is not valid UTF-8' % \
+ log.exception(u'Filename "%s" is not valid UTF-8' %
file.decode(u'utf-8', u'replace'))
continue
osfile = unicode(QtCore.QDir.toNativeSeparators(ucsfile))
@@ -424,8 +424,8 @@
xml_data = xml_data.decode(u'utf-8')
except UnicodeDecodeError:
log.exception(u'Theme XML is not UTF-8 '
- 'encoded.')
- break;
+ u'encoded.')
+ break
if self.checkVersion1(xml_data):
# upgrade theme xml
filexml = self.migrateVersion122(xml_data)
=== modified file 'openlp/plugins/alerts/lib/alertstab.py'
--- openlp/plugins/alerts/lib/alertstab.py 2010-06-14 13:43:04 +0000
+++ openlp/plugins/alerts/lib/alertstab.py 2010-06-20 14:02:26 +0000
@@ -294,5 +294,5 @@
font.setBold(True)
font.setPointSize(self.font_size)
self.FontPreview.setFont(font)
- self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' % \
+ self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' %
(self.bg_color, self.font_color))
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2010-06-20 06:48:32 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2010-06-20 14:02:26 +0000
@@ -649,12 +649,13 @@
text = text + re.sub(r'\W+', u' ',
unicode(self.VerseListWidget.item(i, 0).text())) + u' '
if (bits[1] > u'1') and (bits[0][0] not in multiple):
- multiple.append(bits[0][0])
+ multiple.append(bits[0][0])
self.song.search_lyrics = text
self.song.lyrics = unicode(sxml.extract_xml(), u'utf-8')
for verse in multiple:
self.song.verse_order = re.sub(u'([' + verse.upper() +
- verse.lower() + u'])(\W|$)', r'\g<1>1\2', self.song.verse_order)
+ verse.lower() + u'])(\W|$)', r'\g<1>1\2',
+ self.song.verse_order)
except:
log.exception(u'Problem processing song Lyrics \n%s',
sxml.dump_xml())
=== modified file 'openlp/plugins/songs/lib/songimport.py'
--- openlp/plugins/songs/lib/songimport.py 2010-06-19 21:54:53 +0000
+++ openlp/plugins/songs/lib/songimport.py 2010-06-20 14:02:26 +0000
@@ -23,7 +23,6 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-import string
import re
from PyQt4 import QtGui
=== modified file 'openlp/plugins/songusage/forms/songusagedetailform.py'
--- openlp/plugins/songusage/forms/songusagedetailform.py 2010-06-06 22:30:11 +0000
+++ openlp/plugins/songusage/forms/songusagedetailform.py 2010-06-20 14:02:26 +0000
@@ -71,12 +71,11 @@
def accept(self):
log.debug(u'Detailed report generated')
- filename = u'usage_detail_%s_%s.txt' % \
- (self.FromDate.selectedDate().toString(u'ddMMyyyy'),
- self.ToDate.selectedDate().toString(u'ddMMyyyy'))
- usage = self.parent.songusagemanager.get_all_songusage(\
- self.FromDate.selectedDate(), \
- self.ToDate.selectedDate())
+ filename = u'usage_detail_%s_%s.txt' % (
+ self.FromDate.selectedDate().toString(u'ddMMyyyy'),
+ self.ToDate.selectedDate().toString(u'ddMMyyyy'))
+ usage = self.parent.songusagemanager.get_all_songusage(
+ self.FromDate.selectedDate(), self.ToDate.selectedDate())
outname = os.path.join(unicode(self.FileLineEdit.text()), filename)
file = None
try:
Follow ups