From a224d6a89571853199418b4b7b46beebe22428d9 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Mon, 21 Sep 2009 20:26:10 +0100 Subject: [PATCH] Improve readability for white space patch --- openlp/core/lib/mediamanageritem.py | 18 +++++++++++------- openlp/core/ui/maindisplay.py | 5 +++-- openlp/plugins/bibles/lib/bibleHTTPimpl.py | 3 +-- openlp/plugins/custom/forms/editcustomform.py | 5 +++-- .../presentations/lib/presentationtab.py | 3 ++- openlp/plugins/remotes/lib/remotetab.py | 4 ++-- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 426cb6371..9465a9ab0 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -205,14 +205,16 @@ class MediaManagerItem(QtGui.QWidget): self.addToolbarButton( translate( self.TranslationContext, u'New ' + self.PluginTextShort), - translate(self.TranslationContext, + translate( + self.TranslationContext, u'Add a new ' + self.PluginTextShort), u':' + self.IconPath + u'_new.png', self.onNewClick, self.PluginTextShort + u'NewItem') ## Edit Button ## if self.hasEditIcon: - self.addToolbarButton(translate( - self.TranslationContext, u'Edit ' + self.PluginTextShort), + self.addToolbarButton( + translate( + self.TranslationContext, u'Edit ' + self.PluginTextShort), translate( self.TranslationContext, u'Edit the selected ' + self.PluginTextShort), @@ -240,10 +242,12 @@ class MediaManagerItem(QtGui.QWidget): u':/system/system_live.png', self.onLiveClick, u'LiveItem') ## Add to service Button ## self.addToolbarButton( - translate(self.TranslationContext, - u'Add ' + self.PluginTextShort + u' To Service'), - translate(self.TranslationContext, - u'Add the selected item(s) to the service'), + translate( + self.TranslationContext, + u'Add ' + self.PluginTextShort + u' To Service'), + translate( + self.TranslationContext, + u'Add the selected item(s) to the service'), u':/system/system_add.png', self.onAddClick, self.PluginTextShort + u'AddItem') diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index 78d55da28..d7cbafd8d 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -141,8 +141,9 @@ class MainDisplay(QtGui.QWidget): painter = QtGui.QPainter(alertframe) top = alertframe.rect().height() * 0.9 painter.fillRect( - QtCore.QRect(0, top, - alertframe.rect().width(), alertframe.rect().height() - top), + QtCore.QRect( + 0, top, alertframe.rect().width(), + alertframe.rect().height() - top), QtGui.QColor(alertTab.bg_color)) font = QtGui.QFont() font.setFamily(alertTab.font_face) diff --git a/openlp/plugins/bibles/lib/bibleHTTPimpl.py b/openlp/plugins/bibles/lib/bibleHTTPimpl.py index 22e3c0d7c..4e32b5462 100644 --- a/openlp/plugins/bibles/lib/bibleHTTPimpl.py +++ b/openlp/plugins/bibles/lib/bibleHTTPimpl.py @@ -87,8 +87,7 @@ class BGExtract(BibleCommon): versePos = -1 else: i = xml_string[:i].rfind(u' - verseText = xml_string[versePos + 7 : i - 1 ] + verseText = xml_string[versePos + 7 : i - 1] # Loose # Chop off verse 1 xml_string = xml_string[i - 1 :len(xml_string)] versePos = xml_string.find(VerseSearch) #look for the next verse diff --git a/openlp/plugins/custom/forms/editcustomform.py b/openlp/plugins/custom/forms/editcustomform.py index b4c4ffbfe..44a209141 100644 --- a/openlp/plugins/custom/forms/editcustomform.py +++ b/openlp/plugins/custom/forms/editcustomform.py @@ -126,7 +126,8 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog): sxml.add_lyrics_to_song() count = 1 for i in range (0, self.VerseListView.count()): - sxml.add_verse_to_lyrics(u'custom', unicode(count), + sxml.add_verse_to_lyrics( + u'custom', unicode(count), unicode(self.VerseListView.item(i).text())) count += 1 self.customSlide.title = unicode(self.TitleEdit.displayText()) @@ -207,7 +208,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog): #number of lines has change if len(self.beforeText.split(u'\n')) != \ len(self.VerseTextEdit.toPlainText().split(u'\n')): - tempList = {} + tempList = {} for row in range(0, self.VerseListView.count()): tempList[row] = self.VerseListView.item(row).text() self.VerseListView.clear() diff --git a/openlp/plugins/presentations/lib/presentationtab.py b/openlp/plugins/presentations/lib/presentationtab.py index 919076b07..cd0317c6b 100644 --- a/openlp/plugins/presentations/lib/presentationtab.py +++ b/openlp/plugins/presentations/lib/presentationtab.py @@ -115,7 +115,8 @@ class PresentationTab(SettingsTab): def save(self): self.config.set_config( u'Powerpoint', unicode(self.PowerpointCheckBox.checkState())) - self.config.set_config(u'Powerpoint Viewer', + self.config.set_config( + u'Powerpoint Viewer', unicode(self.PowerpointViewerCheckBox.checkState())) self.config.set_config( u'Impress', unicode(self.ImpressCheckBox.checkState())) diff --git a/openlp/plugins/remotes/lib/remotetab.py b/openlp/plugins/remotes/lib/remotetab.py index 3290f237f..72adc8302 100644 --- a/openlp/plugins/remotes/lib/remotetab.py +++ b/openlp/plugins/remotes/lib/remotetab.py @@ -63,8 +63,8 @@ class RemoteTab(SettingsTab): def load(self): self.RemotePortSpinBox.setValue( int(self.config.get_config(u'remote port', 4316))) - self.RemoteActive.setChecked(int( - self.config.get_config(u'startup', 0))) + self.RemoteActive.setChecked( + int(self.config.get_config(u'startup', 0))) def save(self): self.config.set_config(