Various fixes in the Bibles plugin to get Bibles working correctly in the Windows build.

bzr-revno: 740
This commit is contained in:
Raoul Snyman 2010-03-14 13:38:38 +02:00
commit 521cd2c998
5 changed files with 14 additions and 13 deletions

View File

@ -93,7 +93,6 @@ class BiblePlugin(Plugin):
'displayed on the screen during the service.')
return about_text
def can_delete_theme(self, theme):
if self.settings_tab.bible_theme == theme:
return False

View File

@ -124,7 +124,8 @@ class BibleManager(object):
self.db_cache = {}
for filename in files:
name, extension = os.path.splitext(filename)
self.db_cache[name] = BibleDB(self.parent, path=self.path, name=name, config=self.config)
self.db_cache[name] = BibleDB(self.parent, path=self.path,
name=name, config=self.config)
# look to see if lazy load bible exists and get create getter.
source = self.db_cache[name].get_meta(u'download source')
if source:

View File

@ -45,6 +45,7 @@ class BibleListView(BaseListWithDnD):
def resizeEvent(self, event):
self.parent.onListViewResize(event.size().width(), event.size().width())
class BibleMediaItem(MediaManagerItem):
"""
This is the custom media manager item for Bibles.
@ -452,14 +453,14 @@ class BibleMediaItem(MediaManagerItem):
for item in items:
bitem = self.ListView.item(item.row())
reference = bitem.data(QtCore.Qt.UserRole).toPyObject()
bible = unicode(reference[QtCore.QString('bible')])
book = unicode(reference[QtCore.QString('book')])
chapter = unicode(reference[QtCore.QString('chapter')])
verse = unicode(reference[QtCore.QString('verse')])
text = unicode(reference[QtCore.QString('text')])
version = unicode(reference[QtCore.QString('version')])
copyright = unicode(reference[QtCore.QString('copyright')])
permission = unicode(reference[QtCore.QString('permission')])
bible = unicode(reference[QtCore.QString('bible')].toPyObject())
book = unicode(reference[QtCore.QString('book')].toPyObject())
chapter = unicode(reference[QtCore.QString('chapter')].toPyObject())
verse = unicode(reference[QtCore.QString('verse')].toPyObject())
text = unicode(reference[QtCore.QString('text')].toPyObject())
version = unicode(reference[QtCore.QString('version')].toPyObject())
copyright = unicode(reference[QtCore.QString('copyright')].toPyObject())
permission = unicode(reference[QtCore.QString('permission')].toPyObject())
if self.parent.settings_tab.display_style == 1:
verse_text = self.formatVerse(old_chapter, chapter, verse, u'(u', u')')
elif self.parent.settings_tab.display_style == 2:
@ -563,7 +564,7 @@ class BibleMediaItem(MediaManagerItem):
permission = u''
else:
permission = permission.value
for count, verse in enumerate(self.search_results):
for count, verse in enumerate(self.search_results):
bible_text = u' %s %d:%d (%s)' % \
(verse.book.name, verse.chapter, verse.verse, bible)
bible_verse = QtGui.QListWidgetItem(bible_text)

View File

@ -102,7 +102,7 @@ class OpenSongBible(BibleDB):
finally:
if file:
file.close()
if self.stop_import:
if self.stop_import_flag:
self.wizard.incrementProgressBar(u'Import canceled!')
return False
else:

View File

@ -22,7 +22,7 @@ DefaultDirName={pf}\{#MyAppName}
DefaultGroupName=OpenLP 2.0
AllowNoIcons=true
LicenseFile=LICENSE.txt
OutputBaseFilename=OpenLP-1.9.0-bzr737-setup
OutputBaseFilename=OpenLP-1.9.0-bzr739-setup
Compression=lzma
SolidCompression=true
SetupIconFile=C:\Program Files\Inno Setup 5\Examples\Setup.ico