forked from openlp/openlp
Adapt code for new Settings() infrastructure.
This commit is contained in:
parent
85810cc7f5
commit
6e1f9cd3c1
@ -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'
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user