From a9359a60f18a253aab2917b6804298aaf0f1f9e3 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Mon, 10 Jan 2011 19:04:16 +0000 Subject: [PATCH 1/4] Unused import --- openlp/plugins/bibles/lib/mediaitem.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 253cc2c62..1921fbc6d 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -25,7 +25,6 @@ ############################################################################### import logging -import time from PyQt4 import QtCore, QtGui From d4f98c2169bb4fcad8c704851f16d986d20f66b4 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Mon, 10 Jan 2011 19:07:09 +0000 Subject: [PATCH 2/4] Undefined variable typo --- openlp/core/ui/displaytagtab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/displaytagtab.py b/openlp/core/ui/displaytagtab.py index 3d6cd813d..154d397b9 100644 --- a/openlp/core/ui/displaytagtab.py +++ b/openlp/core/ui/displaytagtab.py @@ -59,7 +59,7 @@ class DisplayTagTab(SettingsTab): # cPickle only accepts str not unicode strings user_expands_string = str(unicode(user_expands).encode(u'utf8')) if user_expands_string: - user_tags = cPickle.loads(user_expand_string) + user_tags = cPickle.loads(user_expands_string) # If we have some user ones added them as well for t in user_tags: DisplayTags.add_html_tag(t) From 8af1756274c1838448de928160d731567238dee7 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Mon, 10 Jan 2011 19:13:40 +0000 Subject: [PATCH 3/4] Long lines --- openlp/core/ui/servicemanager.py | 15 ++++++++------- openlp/core/ui/thememanager.py | 6 ++++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index acd775ef7..5d8d12cb5 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -371,9 +371,9 @@ class ServiceManager(QtGui.QWidget): self.saveFile() fileName = unicode(QtGui.QFileDialog.getOpenFileName(self.mainwindow, translate('OpenLP.ServiceManager', 'Open File'), - SettingsManager.get_last_dir(self.mainwindow.serviceSettingsSection), - translate('OpenLP.ServiceManager', - 'OpenLP Service Files (*.osz)'))) + SettingsManager.get_last_dir( + self.mainwindow.serviceSettingsSection), + translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz)'))) if not fileName: return False SettingsManager.set_last_dir(self.mainwindow.serviceSettingsSection, @@ -461,9 +461,9 @@ class ServiceManager(QtGui.QWidget): """ fileName = unicode(QtGui.QFileDialog.getSaveFileName(self.mainwindow, translate('OpenLP.ServiceManager', 'Save Service'), - SettingsManager.get_last_dir(self.mainwindow.serviceSettingsSection), - translate('OpenLP.ServiceManager', - 'OpenLP Service Files (*.osz)'))) + SettingsManager.get_last_dir( + self.mainwindow.serviceSettingsSection), + translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz)'))) if not fileName: return False if os.path.splitext(fileName)[1] == u'': @@ -951,7 +951,8 @@ class ServiceManager(QtGui.QWidget): newItem.merge(item[u'service_item']) item[u'service_item'] = newItem self.repaintServiceList(itemcount + 1, 0) - self.mainwindow.liveController.replaceServiceManagerItem(newItem) + self.mainwindow.liveController.replaceServiceManagerItem( + newItem) self.setModified(True) def addServiceItem(self, item, rebuild=False, expand=None, replace=False): diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 590f33ff7..7e929bb33 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -51,7 +51,8 @@ class ThemeManager(QtGui.QWidget): self.settingsSection = u'themes' self.themeForm = ThemeForm(self) self.fileRenameForm = FileRenameForm(self) - self.serviceComboBox = self.mainwindow.ServiceManagerContents.themeComboBox + self.serviceComboBox = \ + self.mainwindow.ServiceManagerContents.themeComboBox # start with the layout self.layout = QtGui.QVBoxLayout(self) self.layout.setSpacing(0) @@ -638,7 +639,8 @@ class ThemeManager(QtGui.QWidget): Flag to tell message lines per page need to be generated. """ log.debug(u'generateImage \n%s ', themeData) - return self.mainwindow.renderManager.generate_preview(themeData, forcePage) + return self.mainwindow.renderManager.generate_preview( + themeData, forcePage) def getPreviewImage(self, theme): """ From ac46fe92f07250a18156a440e1cc211cb0e0a97e Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Mon, 10 Jan 2011 20:19:27 +0000 Subject: [PATCH 4/4] Remove redundant unicode() --- openlp/core/ui/servicemanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 5d8d12cb5..2d85e4b7f 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -482,7 +482,7 @@ class ServiceManager(QtGui.QWidget): zip = None fileTo = None try: - zip = zipfile.ZipFile(unicode(fileName)) + zip = zipfile.ZipFile(fileName) for file in zip.namelist(): try: ucsfile = file.decode(u'utf-8')