forked from openlp/openlp
bible plugin fixes
This commit is contained in:
commit
98274b596e
@ -257,6 +257,14 @@ class BibleManager(object):
|
||||
- Genesis 1:1-10,2:1-10
|
||||
"""
|
||||
log.debug(u'BibleManager.get_verses("%s", "%s")', bible, versetext)
|
||||
if not bible:
|
||||
QtGui.QMessageBox.information(self.parent.mediaItem,
|
||||
translate('BiblesPlugin.BibleManager',
|
||||
'No Bibles available'),
|
||||
translate('BiblesPlugin.BibleManager',
|
||||
'There are no Bibles currently installed. Please use the '
|
||||
'Import Wizard to install one or more Bibles.'))
|
||||
return None
|
||||
reflist = parse_reference(versetext)
|
||||
if reflist:
|
||||
return self.db_cache[bible].get_verses(reflist)
|
||||
|
@ -626,6 +626,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
Displays the search results in the media manager. All data needed for
|
||||
further action is saved for/in each row.
|
||||
"""
|
||||
verse_separator = get_reference_match(u'sep_v_display')
|
||||
version = self.parent.manager.get_meta_data(bible, u'Version')
|
||||
copyright = self.parent.manager.get_meta_data(bible, u'Copyright')
|
||||
permissions = self.parent.manager.get_meta_data(bible, u'Permissions')
|
||||
@ -661,8 +662,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
}
|
||||
except IndexError:
|
||||
break
|
||||
bible_text = u' %s %d:%d (%s, %s)' % (verse.book.name,
|
||||
verse.chapter, verse.verse, version.value,
|
||||
bible_text = u' %s %d%s%d (%s, %s)' % (verse.book.name,
|
||||
verse.chapter, verse_separator, verse.verse, version.value,
|
||||
second_version.value)
|
||||
else:
|
||||
vdict = {
|
||||
@ -680,8 +681,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
'second_permissions': QtCore.QVariant(u''),
|
||||
'second_text': QtCore.QVariant(u'')
|
||||
}
|
||||
bible_text = u'%s %d:%d (%s)' % (verse.book.name,
|
||||
verse.chapter, verse.verse, version.value)
|
||||
bible_text = u'%s %d%s%d (%s)' % (verse.book.name,
|
||||
verse.chapter, verse_separator, verse.verse, version.value)
|
||||
bible_verse = QtGui.QListWidgetItem(bible_text)
|
||||
bible_verse.setData(QtCore.Qt.UserRole, QtCore.QVariant(vdict))
|
||||
self.listView.addItem(bible_verse)
|
||||
|
@ -43,8 +43,8 @@ Luke,Luke,Luke
|
||||
John,John,John
|
||||
Acts,Acts,Acts
|
||||
Rom,Romans,Rom
|
||||
1Cor,1 Corinthans,1Cor
|
||||
2Cor,2 Corinthans,2Cor
|
||||
1Cor,1 Corinthians,1Cor
|
||||
2Cor,2 Corinthians,2Cor
|
||||
Gal,Galatians,Gal
|
||||
Eph,Ephesians,Eph
|
||||
Phil,Philippians,Phil
|
||||
|
|
@ -112,6 +112,8 @@ class Ui_EditSongDialog(object):
|
||||
self.authorAddLayout = QtGui.QHBoxLayout()
|
||||
self.authorAddLayout.setObjectName(u'authorAddLayout')
|
||||
self.authorsComboBox = QtGui.QComboBox(self.authorsGroupBox)
|
||||
self.authorsComboBox.setSizeAdjustPolicy(
|
||||
QtGui.QComboBox.AdjustToMinimumContentsLength)
|
||||
self.authorsComboBox.setSizePolicy(QtGui.QSizePolicy.Expanding,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
self.authorsComboBox.setEditable(True)
|
||||
@ -151,6 +153,8 @@ class Ui_EditSongDialog(object):
|
||||
self.topicAddLayout = QtGui.QHBoxLayout()
|
||||
self.topicAddLayout.setObjectName(u'topicAddLayout')
|
||||
self.topicsComboBox = QtGui.QComboBox(self.topicsGroupBox)
|
||||
self.topicsComboBox.setSizeAdjustPolicy(
|
||||
QtGui.QComboBox.AdjustToMinimumContentsLength)
|
||||
self.topicsComboBox.setSizePolicy(QtGui.QSizePolicy.Expanding,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
self.topicsComboBox.setEditable(True)
|
||||
@ -210,6 +214,8 @@ class Ui_EditSongDialog(object):
|
||||
self.themeLayout = QtGui.QHBoxLayout(self.themeGroupBox)
|
||||
self.themeLayout.setObjectName(u'themeLayout')
|
||||
self.themeComboBox = QtGui.QComboBox(self.themeGroupBox)
|
||||
self.themeComboBox.setSizeAdjustPolicy(
|
||||
QtGui.QComboBox.AdjustToMinimumContentsLength)
|
||||
self.themeComboBox.setSizePolicy(QtGui.QSizePolicy.Expanding,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
self.themeComboBox.setEditable(True)
|
||||
@ -230,7 +236,6 @@ class Ui_EditSongDialog(object):
|
||||
self.copyrightEdit.setObjectName(u'copyrightEdit')
|
||||
self.copyrightLayout.addWidget(self.copyrightEdit)
|
||||
self.copyrightInsertButton = QtGui.QToolButton(self.rightsGroupBox)
|
||||
self.copyrightInsertButton.setAutoRaise(True)
|
||||
self.copyrightInsertButton.setObjectName(u'copyrightInsertButton')
|
||||
self.copyrightLayout.addWidget(self.copyrightInsertButton)
|
||||
self.rightsLayout.addLayout(self.copyrightLayout)
|
||||
@ -247,10 +252,6 @@ class Ui_EditSongDialog(object):
|
||||
self.themeLeftLayout.addStretch()
|
||||
self.themeTabLayout.addLayout(self.themeLeftLayout)
|
||||
self.commentsGroupBox = QtGui.QGroupBox(self.themeTab)
|
||||
self.commentsSizePolicy = QtGui.QSizePolicy(
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
self.commentsSizePolicy.setHorizontalStretch(1)
|
||||
self.commentsGroupBox.setSizePolicy(self.commentsSizePolicy)
|
||||
self.commentsGroupBox.setObjectName(u'commentsGroupBox')
|
||||
self.commentsLayout = QtGui.QVBoxLayout(self.commentsGroupBox)
|
||||
self.commentsLayout.setObjectName(u'commentsLayout')
|
||||
|
Loading…
Reference in New Issue
Block a user