From 0a0d7dca84b5f578f5d566e993104230c2416097 Mon Sep 17 00:00:00 2001 From: Oliver Wieland Date: Mon, 26 Aug 2013 19:14:52 +0200 Subject: [PATCH] biblestab.py: minor changes in naming objects mediaitem.py: rearrange code for better readability --- openlp/plugins/bibles/lib/biblestab.py | 4 ++-- openlp/plugins/bibles/lib/mediaitem.py | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/openlp/plugins/bibles/lib/biblestab.py b/openlp/plugins/bibles/lib/biblestab.py index ed3ccefa4..0b2d19615 100644 --- a/openlp/plugins/bibles/lib/biblestab.py +++ b/openlp/plugins/bibles/lib/biblestab.py @@ -59,7 +59,7 @@ class BiblesTab(SettingsTab): self.verse_display_layout = QtGui.QFormLayout(self.verse_display_group_box) self.verse_display_layout.setObjectName(u'verse_display_layout') self.is_verse_number_visible_check_box = QtGui.QCheckBox(self.verse_display_group_box) - self.is_verse_number_visible_check_box.setObjectName(u'verse_display_check_box') + self.is_verse_number_visible_check_box.setObjectName(u'is_verse_number_visible_check_box') self.verse_display_layout.addRow(self.is_verse_number_visible_check_box) self.new_chapters_check_box = QtGui.QCheckBox(self.verse_display_group_box) self.new_chapters_check_box.setObjectName(u'new_chapters_check_box') @@ -160,7 +160,7 @@ class BiblesTab(SettingsTab): def retranslateUi(self): self.verse_display_group_box.setTitle(translate('BiblesPlugin.BiblesTab', 'Verse Display')) - self.is_verse_number_visible_check_box.setText(translate('BiblesPlugin.BiblesTab', 'Is verse number visible')) + self.is_verse_number_visible_check_box.setText(translate('BiblesPlugin.BiblesTab', 'Show verse numbers')) self.new_chapters_check_box.setText(translate('BiblesPlugin.BiblesTab', 'Only show new chapter numbers')) self.layout_style_label.setText(UiStrings().LayoutStyle) self.display_style_label.setText(UiStrings().DisplayStyle) diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index c2f444768..682fdb7a3 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -943,19 +943,19 @@ class BibleMediaItem(MediaManagerItem): The verse number (int). """ verse_separator = get_reference_separator(u'sep_v_display') - if self.settings.is_verse_number_visible: - if not self.settings.show_new_chapters or old_chapter != chapter: - verse_text = unicode(chapter) + verse_separator + unicode(verse) - else: - verse_text = unicode(verse) - if self.settings.display_style == DisplayStyle.Round: - return u'{su}(%s){/su}' % verse_text - elif self.settings.display_style == DisplayStyle.Curly: - return u'{su}{%s}{/su}' % verse_text - elif self.settings.display_style == DisplayStyle.Square: - return u'{su}[%s]{/su}' % verse_text - return u'{su}%s{/su}' % verse_text - return u'' + if not self.settings.is_verse_number_visible: + return u'' + if not self.settings.show_new_chapters or old_chapter != chapter: + verse_text = unicode(chapter) + verse_separator + unicode(verse) + else: + verse_text = unicode(verse) + if self.settings.display_style == DisplayStyle.Round: + return u'{su}(%s){/su}' % verse_text + elif self.settings.display_style == DisplayStyle.Curly: + return u'{su}{%s}{/su}' % verse_text + elif self.settings.display_style == DisplayStyle.Square: + return u'{su}[%s]{/su}' % verse_text + return u'{su}%s{/su}' % verse_text def search(self, string, showError): """