From c2b1dd9f2f6c1062dec49a0ffa57797654b879b5 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Sat, 8 Jan 2011 02:44:12 +0000 Subject: [PATCH] More cleanups --- openlp/core/lib/__init__.py | 3 ++- openlp/core/lib/mediamanageritem.py | 3 ++- openlp/core/ui/servicemanager.py | 5 ++--- openlp/core/ui/themewizard.py | 9 ++++++--- openlp/plugins/bibles/lib/manager.py | 8 ++++---- openlp/plugins/presentations/lib/presentationtab.py | 3 ++- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index ebbe31597..2bcb25d85 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -102,7 +102,8 @@ def translate(context, text, comment=None, An identifying string for when the same text is used in different roles within the same context. """ - return QtCore.QCoreApplication.translate(context, text, comment, encoding, n) + return QtCore.QCoreApplication.translate(context, text, comment, encoding, + n) def get_text_file_string(text_file): """ diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index c92960163..2d6bcce46 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -176,7 +176,8 @@ class MediaManagerItem(QtGui.QWidget): # break compatability), but it makes sense for the icon to # come before the tooltip (as you have to have an icon, but # not neccesarily a tooltip) - return self.toolbar.addToolbarButton(title, icon, tooltip, slot, checkable) + return self.toolbar.addToolbarButton(title, icon, tooltip, slot, + checkable) def addToolbarSeparator(self): """ diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index a9bf232d4..d918a7083 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -28,7 +28,6 @@ import os import logging import cPickle import zipfile -from pprint import pformat log = logging.getLogger(__name__) @@ -986,8 +985,8 @@ class ServiceManager(QtGui.QWidget): u'expanded':expand}) self.repaintServiceList(len(self.serviceItems) + 1, 0) else: - self.serviceItems.insert(self.dropPosition, {u'service_item': item, - u'order': self.dropPosition, + self.serviceItems.insert(self.dropPosition, + {u'service_item': item, u'order': self.dropPosition, u'expanded':expand}) self.repaintServiceList(self.dropPosition, 0) # if rebuilding list make sure live is fixed. diff --git a/openlp/core/ui/themewizard.py b/openlp/core/ui/themewizard.py index 1bf0a0038..ae2a4e1bd 100644 --- a/openlp/core/ui/themewizard.py +++ b/openlp/core/ui/themewizard.py @@ -249,7 +249,8 @@ class Ui_ThemeWizard(object): self.footerSizeSpinBox.setMaximum(999) self.footerSizeSpinBox.setValue(10) self.footerSizeSpinBox.setObjectName(u'FooterSizeSpinBox') - self.footerAreaLayout.addRow(self.footerSizeLabel, self.footerSizeSpinBox) + self.footerAreaLayout.addRow(self.footerSizeLabel, + self.footerSizeSpinBox) ThemeWizard.addPage(self.footerAreaPage) # Alignment Page self.alignmentPage = QtGui.QWizardPage() @@ -317,9 +318,11 @@ class Ui_ThemeWizard(object): self.areaPositionLayout.addWidget(self.mainPositionGroupBox) self.footerPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage) self.footerPositionGroupBox.setObjectName(u'FooterPositionGroupBox') - self.footerPositionLayout = QtGui.QFormLayout(self.footerPositionGroupBox) + self.footerPositionLayout = QtGui.QFormLayout( + self.footerPositionGroupBox) self.footerPositionLayout.setObjectName(u'FooterPositionLayout') - self.footerPositionCheckBox = QtGui.QCheckBox(self.footerPositionGroupBox) + self.footerPositionCheckBox = QtGui.QCheckBox(i + self.footerPositionGroupBox) self.footerPositionCheckBox.setObjectName(u'FooterPositionCheckBox') self.footerPositionLayout.addRow(self.footerPositionCheckBox) self.footerXLabel = QtGui.QLabel(self.footerPositionGroupBox) diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index 8e1dadd0e..63c6954fb 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -273,10 +273,10 @@ class BibleManager(object): Receiver.send_message(u'openlp_information_message', { u'title': translate('BiblesPlugin.BibleManager', 'Scripture Reference Error'), - u'message': translate('BiblesPlugin.BibleManager', 'Your scripture ' - 'reference is either not supported by OpenLP or is invalid. ' - 'Please make sure your reference conforms to one of the ' - 'following patterns:\n\n' + u'message': translate('BiblesPlugin.BibleManager', + 'Your scripture reference is either not supported by OpenLP ' + 'or is invalid. Please make sure your reference conforms to ' + 'one of the following patterns:\n\n' 'Book Chapter\n' 'Book Chapter-Chapter\n' 'Book Chapter:Verse-Verse\n' diff --git a/openlp/plugins/presentations/lib/presentationtab.py b/openlp/plugins/presentations/lib/presentationtab.py index c4df4f4e1..fc82600df 100644 --- a/openlp/plugins/presentations/lib/presentationtab.py +++ b/openlp/plugins/presentations/lib/presentationtab.py @@ -116,7 +116,8 @@ class PresentationTab(SettingsTab): if controller.available: checkbox = self.PresenterCheckboxes[controller.name] setting_key = self.settingsSection + u'/' + controller.name - if QtCore.QSettings().value(setting_key) != checkbox.checkState(): + if QtCore.QSettings().value(setting_key) != \ + checkbox.checkState(): changed = True QtCore.QSettings().setValue(setting_key, QtCore.QVariant(checkbox.checkState()))