Adapt code for new Settings() infrastructure.

This commit is contained in:
Patrick Zimmermann 2013-01-27 23:07:30 +01:00
parent 85810cc7f5
commit 6e1f9cd3c1
3 changed files with 3 additions and 3 deletions

View File

@ -122,7 +122,7 @@ class OpenLP(QtGui.QApplication):
Settings().setValue(u'general/has run wizard', True)
# Correct stylesheet bugs
application_stylesheet = u''
if not Settings().value(u'advanced/alternate rows', not sys.platform.startswith(u'win')):
if not Settings().value(u'advanced/alternate rows'):
base_color = self.palette().color(QtGui.QPalette.Active, QtGui.QPalette.Base)
alternate_rows_repair_stylesheet = \
u'QTableWidget, QListWidget, QTreeWidget {alternate-background-color: ' + base_color.name() + ';}\n'

View File

@ -87,6 +87,7 @@ class Settings(QtCore.QSettings):
"""
__default_settings__ = {
u'advanced/x11 bypass wm': X11_BYPASS_DEFAULT,
u'advanced/alternate rows': not sys.platform.startswith(u'win'),
u'advanced/default service enabled': True,
u'advanced/enable exit confirmation': True,
u'advanced/save current plugin': False,

View File

@ -368,10 +368,9 @@ class AdvancedTab(SettingsTab):
self.defaultColor = settings.value(u'default color')
self.defaultFileEdit.setText(settings.value(u'default image'))
self.slide_limits = settings.value(u'slide limits')
# Fix for bug #936281.
# Prevent the dialog displayed by the alternateRowsCheckBox to display.
self.alternateRowsCheckBox.blockSignals(True)
self.alternateRowsCheckBox.setChecked(settings.value(u'alternate rows', not sys.platform.startswith(u'win')))
self.alternateRowsCheckBox.setChecked(settings.value(u'alternate rows'))
self.alternateRowsCheckBox.blockSignals(False)
if self.slide_limits == SlideLimits.End:
self.endSlideRadioButton.setChecked(True)