forked from openlp/openlp
bible clean ups
bzr-revno: 1936
This commit is contained in:
commit
c0cae670ef
@ -244,9 +244,9 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.addSearchFields(u'advanced', UiStrings().Advanced)
|
self.addSearchFields(u'advanced', UiStrings().Advanced)
|
||||||
# Combo Boxes
|
# Combo Boxes
|
||||||
QtCore.QObject.connect(self.quickVersionComboBox,
|
QtCore.QObject.connect(self.quickVersionComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onQuickVersionComboBox)
|
QtCore.SIGNAL(u'activated(int)'), self.updateAutoCompleter)
|
||||||
QtCore.QObject.connect(self.quickSecondComboBox,
|
QtCore.QObject.connect(self.quickSecondComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onQuickSecondComboBox)
|
QtCore.SIGNAL(u'activated(int)'), self.updateAutoCompleter)
|
||||||
QtCore.QObject.connect(self.advancedVersionComboBox,
|
QtCore.QObject.connect(self.advancedVersionComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedVersionComboBox)
|
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedVersionComboBox)
|
||||||
QtCore.QObject.connect(self.advancedSecondComboBox,
|
QtCore.QObject.connect(self.advancedSecondComboBox,
|
||||||
@ -379,14 +379,13 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.advancedSecondComboBox.addItem(u'')
|
self.advancedSecondComboBox.addItem(u'')
|
||||||
# Get all bibles and sort the list.
|
# Get all bibles and sort the list.
|
||||||
bibles = self.plugin.manager.get_bibles().keys()
|
bibles = self.plugin.manager.get_bibles().keys()
|
||||||
|
bibles = filter(None, bibles)
|
||||||
bibles.sort(cmp=locale.strcoll)
|
bibles.sort(cmp=locale.strcoll)
|
||||||
# Load the bibles into the combo boxes.
|
# Load the bibles into the combo boxes.
|
||||||
for bible in bibles:
|
self.quickVersionComboBox.addItems(bibles)
|
||||||
if bible:
|
self.quickSecondComboBox.addItems(bibles)
|
||||||
self.quickVersionComboBox.addItem(bible)
|
self.advancedVersionComboBox.addItems(bibles)
|
||||||
self.quickSecondComboBox.addItem(bible)
|
self.advancedSecondComboBox.addItems(bibles)
|
||||||
self.advancedVersionComboBox.addItem(bible)
|
|
||||||
self.advancedSecondComboBox.addItem(bible)
|
|
||||||
# set the default value
|
# set the default value
|
||||||
bible = QtCore.QSettings().value(
|
bible = QtCore.QSettings().value(
|
||||||
self.settingsSection + u'/advanced bible',
|
self.settingsSection + u'/advanced bible',
|
||||||
@ -524,12 +523,6 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
books.sort(cmp=locale.strcoll)
|
books.sort(cmp=locale.strcoll)
|
||||||
set_case_insensitive_completer(books, self.quickSearchEdit)
|
set_case_insensitive_completer(books, self.quickSearchEdit)
|
||||||
|
|
||||||
def onQuickVersionComboBox(self):
|
|
||||||
self.updateAutoCompleter()
|
|
||||||
|
|
||||||
def onQuickSecondComboBox(self):
|
|
||||||
self.updateAutoCompleter()
|
|
||||||
|
|
||||||
def onImportClick(self):
|
def onImportClick(self):
|
||||||
if not hasattr(self, u'import_wizard'):
|
if not hasattr(self, u'import_wizard'):
|
||||||
self.import_wizard = BibleImportForm(self, self.plugin.manager,
|
self.import_wizard = BibleImportForm(self, self.plugin.manager,
|
||||||
@ -998,7 +991,6 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
# last verse of the chapter or the current verse is not the
|
# last verse of the chapter or the current verse is not the
|
||||||
# first one of the chapter.
|
# first one of the chapter.
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def formatVerse(self, old_chapter, chapter, verse):
|
def formatVerse(self, old_chapter, chapter, verse):
|
||||||
|
Loading…
Reference in New Issue
Block a user