clean ups

This commit is contained in:
Andreas Preikschat 2012-04-01 13:16:08 +02:00
parent 152bd850eb
commit dbe9fc51aa
1 changed files with 8 additions and 16 deletions

View File

@ -242,9 +242,9 @@ class BibleMediaItem(MediaManagerItem):
self.addSearchFields(u'advanced', UiStrings().Advanced)
# Combo Boxes
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.SIGNAL(u'activated(int)'), self.onQuickSecondComboBox)
QtCore.SIGNAL(u'activated(int)'), self.updateAutoCompleter)
QtCore.QObject.connect(self.advancedVersionComboBox,
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedVersionComboBox)
QtCore.QObject.connect(self.advancedSecondComboBox,
@ -379,12 +379,11 @@ class BibleMediaItem(MediaManagerItem):
bibles = self.plugin.manager.get_bibles().keys()
bibles.sort(cmp=locale.strcoll)
# Load the bibles into the combo boxes.
for bible in bibles:
if bible:
self.quickVersionComboBox.addItem(bible)
self.quickSecondComboBox.addItem(bible)
self.advancedVersionComboBox.addItem(bible)
self.advancedSecondComboBox.addItem(bible)
tmp_bibles = [bible for bible in bibles if bible]
self.quickVersionComboBox.addItems(tmp_bibles)
self.quickSecondComboBox.addItems(tmp_bibles)
self.advancedVersionComboBox.addItems(tmp_bibles)
self.advancedSecondComboBox.addItems(tmp_bibles)
# set the default value
bible = QtCore.QSettings().value(
self.settingsSection + u'/advanced bible',
@ -522,12 +521,6 @@ class BibleMediaItem(MediaManagerItem):
books.sort(cmp=locale.strcoll)
add_widget_completer(books, self.quickSearchEdit)
def onQuickVersionComboBox(self):
self.updateAutoCompleter()
def onQuickSecondComboBox(self):
self.updateAutoCompleter()
def onImportClick(self):
if not hasattr(self, u'import_wizard'):
self.import_wizard = BibleImportForm(self, self.plugin.manager,
@ -996,8 +989,7 @@ class BibleMediaItem(MediaManagerItem):
# last verse of the chapter or the current verse is not the
# first one of the chapter.
return True
else:
return False
return False
def formatVerse(self, old_chapter, chapter, verse):
"""