forked from openlp/openlp
use filter instead of list comprehension
This commit is contained in:
parent
dbe9fc51aa
commit
704795830d
@ -377,13 +377,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.
|
||||||
tmp_bibles = [bible for bible in bibles if bible]
|
self.quickVersionComboBox.addItems(bibles)
|
||||||
self.quickVersionComboBox.addItems(tmp_bibles)
|
self.quickSecondComboBox.addItems(bibles)
|
||||||
self.quickSecondComboBox.addItems(tmp_bibles)
|
self.advancedVersionComboBox.addItems(bibles)
|
||||||
self.advancedVersionComboBox.addItems(tmp_bibles)
|
self.advancedSecondComboBox.addItems(bibles)
|
||||||
self.advancedSecondComboBox.addItems(tmp_bibles)
|
|
||||||
# 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',
|
||||||
|
Loading…
Reference in New Issue
Block a user