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.') 'displayed on the screen during the service.')
return about_text return about_text
def can_delete_theme(self, theme): def can_delete_theme(self, theme):
if self.settings_tab.bible_theme == theme: if self.settings_tab.bible_theme == theme:
return False return False

View File

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

View File

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

View File

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

View File

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