Erik Lundin has proposed merging lp:~erik-lundin/openlp/bug-986495 into lp:openlp.
Commit message: Fixed bug #986495 'Cannot change bible language in bible editor'. Requested reviews: OpenLP Core (openlp-core) Related bugs: Bug #986495 in OpenLP: "Cannot change bible language in bible editor" https://bugs.launchpad.net/openlp/+bug/986495 For more details, see: https://code.launchpad.net/~erik-lundin/openlp/bug-986495/+merge/125585 Fixed bug #986495 'Cannot change bible language in bible editor'. -- https://code.launchpad.net/~erik-lundin/openlp/bug-986495/+merge/125585 Your team OpenLP Core is requested to review the proposed merge of lp:~erik-lundin/openlp/bug-986495 into lp:openlp.
=== modified file 'openlp/plugins/bibles/lib/manager.py' --- openlp/plugins/bibles/lib/manager.py 2012-09-04 22:39:47 +0000 +++ openlp/plugins/bibles/lib/manager.py 2012-09-20 21:22:20 +0000 @@ -366,15 +366,20 @@ """ log.debug(u'BibleManager.get_language_selection("%s")', bible) language_selection = self.get_meta_data(bible, u'book_name_language') - if language_selection: - try: - language_selection = int(language_selection.value) - except (ValueError, TypeError): - language_selection = LanguageSelection.Application - if language_selection is None or language_selection == -1: + if not language_selection or \ + language_selection.value == "None" or \ + language_selection.value == "-1": + # If None is returned, it's not the singleton object but a + # BibleMeta object with the value "None" language_selection = Settings().value( - self.settingsSection + u'/bookname language', + self.settingsSection + u'/book name language', QtCore.QVariant(0)).toInt()[0] + else: + language_selection = language_selection.value + try: + language_selection = int(language_selection) + except (ValueError, TypeError): + language_selection = LanguageSelection.Application return language_selection def verse_search(self, bible, second_bible, text):
_______________________________________________ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp