Fix up bug for bible settings of duel drop down

Fixes: https://launchpad.net/bugs/629848
This commit is contained in:
Tim Bentley 2010-09-04 20:40:28 +01:00
parent da64f5147c
commit e2c117034a
4 changed files with 10 additions and 7 deletions

View File

@ -476,7 +476,6 @@ class GeneralTab(SettingsTab):
# Order is important so be careful if you change
if self.overrideChanged or postUpdate:
Receiver.send_message(u'config_screen_changed')
Receiver.send_message(u'config_updated')
self.overrideChanged = False
def onOverrideCheckBoxToggled(self, checked):

View File

@ -30,6 +30,7 @@ import logging
from PyQt4 import QtGui
from openlp.core.lib import Receiver
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab
from settingsdialog import Ui_SettingsDialog
@ -87,6 +88,8 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
"""
for tabIndex in range(0, self.settingsTabWidget.count()):
self.settingsTabWidget.widget(tabIndex).save()
# Must go after all settings are save
Receiver.send_message(u'config_updated')
return QtGui.QDialog.accept(self)
def postSetUp(self):

View File

@ -196,10 +196,10 @@ class BiblesTab(SettingsTab):
self.show_new_chapters = True
def onBibleDualCheckBox(self, check_state):
self.duel_bibles = False
self.dual_bibles = False
# we have a set value convert to True/False
if check_state == QtCore.Qt.Checked:
self.duel_bibles = True
self.dual_bibles = True
def load(self):
settings = QtCore.QSettings()
@ -212,12 +212,12 @@ class BiblesTab(SettingsTab):
u'verse layout style', QtCore.QVariant(0)).toInt()[0]
self.bible_theme = unicode(
settings.value(u'bible theme', QtCore.QVariant(u'')).toString())
self.duel_bibles = settings.value(
self.dual_bibles = settings.value(
u'dual bibles', QtCore.QVariant(True)).toBool()
self.NewChaptersCheckBox.setChecked(self.show_new_chapters)
self.DisplayStyleComboBox.setCurrentIndex(self.display_style)
self.LayoutStyleComboBox.setCurrentIndex(self.layout_style)
self.BibleDualCheckBox.setChecked(self.duel_bibles)
self.BibleDualCheckBox.setChecked(self.dual_bibles)
settings.endGroup()
def save(self):
@ -229,7 +229,7 @@ class BiblesTab(SettingsTab):
QtCore.QVariant(self.display_style))
settings.setValue(u'verse layout style',
QtCore.QVariant(self.layout_style))
settings.setValue(u'dual bibles', QtCore.QVariant(self.duel_bibles))
settings.setValue(u'dual bibles', QtCore.QVariant(self.dual_bibles))
settings.setValue(u'bible theme', QtCore.QVariant(self.bible_theme))
settings.endGroup()

View File

@ -275,8 +275,9 @@ class BibleMediaItem(MediaManagerItem):
self.SearchProgress.setObjectName(u'SearchProgress')
def configUpdated(self):
log.debug(u'configUpdated')
if QtCore.QSettings().value(self.settingsSection + u'/dual bibles',
QtCore.QVariant(False)).toBool():
QtCore.QVariant(True)).toBool():
self.AdvancedSecondBibleLabel.setVisible(True)
self.AdvancedSecondBibleComboBox.setVisible(True)
self.QuickSecondVersionLabel.setVisible(True)