From 6e1f9cd3c1f8d6ee14535d04957956ae08c23ee9 Mon Sep 17 00:00:00 2001 From: Patrick Zimmermann Date: Sun, 27 Jan 2013 23:07:30 +0100 Subject: [PATCH] Adapt code for new Settings() infrastructure. --- openlp/core/__init__.py | 2 +- openlp/core/lib/settings.py | 1 + openlp/core/ui/advancedtab.py | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index 31353121e..e31ff0c5d 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -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' diff --git a/openlp/core/lib/settings.py b/openlp/core/lib/settings.py index aad851dca..37a1c9feb 100644 --- a/openlp/core/lib/settings.py +++ b/openlp/core/lib/settings.py @@ -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, diff --git a/openlp/core/ui/advancedtab.py b/openlp/core/ui/advancedtab.py index cec1b646d..cb11c0b63 100644 --- a/openlp/core/ui/advancedtab.py +++ b/openlp/core/ui/advancedtab.py @@ -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)