Fix Bible plugin to handle themes correctly when changed and removed.

This commit is contained in:
Tim Bentley 2009-05-18 17:11:59 +01:00
parent 37b755affe
commit d5b2a1e496
2 changed files with 6 additions and 2 deletions

View File

@ -190,7 +190,7 @@ class BiblesTab(SettingsTab):
self.paragraph_style = convertStringToBoolean(self.config.get_config(u'paragraph style', u'True'))
self.show_new_chapters = convertStringToBoolean(self.config.get_config(u'display new chapter', u"False"))
self.display_style = int(self.config.get_config(u'display brackets', u'0'))
self.bible_theme = int(self.config.get_config(u'bible theme', u'0'))
self.bible_theme = self.config.get_config(u'bible theme', u'0')
self.bible_search = convertStringToBoolean(self.config.get_config(u'search as type', u'True'))
if self.paragraph_style:
self.ParagraphRadioButton.setChecked(True)
@ -218,4 +218,5 @@ class BiblesTab(SettingsTab):
id = self.BibleThemeComboBox.findText(str(self.bible_theme), QtCore.Qt.MatchExactly)
if id == -1:
id = 0 # Not Found
self.bible_theme = u''
self.BibleThemeComboBox.setCurrentIndex(id)

View File

@ -398,7 +398,10 @@ class BibleMediaItem(MediaManagerItem):
if len(raw_footer) <= 1:
raw_footer.append(book)
service_item.theme = self.parent.bibles_tab.bible_theme
if len(self.parent.bibles_tab.bible_theme) == 0:
service_item.theme = None
else:
service_item.theme = self.parent.bibles_tab.bible_theme
raw_slides.append(bible_text)
service_item.raw_slides = raw_slides
service_item.raw_footer = raw_footer