openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01644
[Merge] lp:~googol-hush/openlp/trivial into lp:openlp
googol has proposed merging lp:~googol-hush/openlp/trivial into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Now the footer shows also the copyright and version information of the second bible. The footer is structured like this:
<book>
<version> <copyright> (bible1)
<version> <copyright> (bible2)
I also changed "Permission" to "Permissions" (lines 466 and 583), because of the save_meta_data in bibles/lib/manager.
--
https://code.launchpad.net/~googol-hush/openlp/trivial/+merge/26204
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/trivial into lp:openlp.
=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py 2010-05-15 19:59:21 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py 2010-05-27 16:48:32 +0000
@@ -463,7 +463,19 @@
bible2_verses.extend(self.parent.manager.get_verses(bible2, scripture))
bible2_version = self.parent.manager.get_meta_data(bible2, u'Version')
bible2_copyright = self.parent.manager.get_meta_data(bible2, u'Copyright')
- bible2_permission = self.parent.manager.get_meta_data(bible2, u'Permission')
+ bible2_permission = self.parent.manager.get_meta_data(bible2, u'Permissions')
+ if bible2_version:
+ bible2_version = bible2_version.value
+ else:
+ bible2_version = u''
+ if bible2_copyright:
+ bible2_copyright = bible2_copyright.value
+ else:
+ bible2_copyright = u''
+ if bible2_permission:
+ bible2_permission = bible2_permission.value
+ else:
+ bible2_permission = u''
# Let's loop through the main lot, and assemble our verses
for item in items:
bitem = self.ListView.item(item.row())
@@ -487,13 +499,17 @@
else:
verse_text = self.formatVerse(old_chapter, chapter, verse, u'', u'')
old_chapter = chapter
- footer = u'%s (%s %s)' % (book, version, copyright)
- #If not found add to footer
+ footer = u'%s' % (book)
+ #If not found add book to footer
+ if footer not in raw_footer:
+ raw_footer.append(footer)
+ footer = u'%s %s' % (version, copyright)
+ #If not found add version and copyright to footer
if footer not in raw_footer:
raw_footer.append(footer)
if bible2:
- footer = u'%s (%s %s)' % (book, version, copyright)
- #If not found add to footer
+ footer = u'%s %s' % (bible2_version, bible2_copyright)
+ #If not found add second version and copyright to footer
if footer not in raw_footer:
raw_footer.append(footer)
bible_text = u'%s %s \n\n %s %s' % \
@@ -580,7 +596,7 @@
def displayResults(self, bible):
version = self.parent.manager.get_meta_data(bible, u'Version')
copyright = self.parent.manager.get_meta_data(bible, u'Copyright')
- permission = self.parent.manager.get_meta_data(bible, u'Permission')
+ permission = self.parent.manager.get_meta_data(bible, u'Permissions')
if not permission:
permission = u''
else: