openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #18405
[Merge] lp:~patrick-zakweb/openlp/bug-936281-newformat into lp:openlp
mohij has proposed merging lp:~patrick-zakweb/openlp/bug-936281-newformat into lp:openlp.
Requested reviews:
Tim Bentley (trb143)
Jonathan Corwin (j-corwin)
Andreas Preikschat (googol)
For more details, see:
https://code.launchpad.net/~patrick-zakweb/openlp/bug-936281-newformat/+merge/140780
Continuation of bug-9362181 branch.
My bzr denied pushing to the other branch with a "different serializers" incompatibility error. Thus I created a new branch. I hope it is ok to loose the history of the old branch.
-Corrected indentation.
-Tested on Kubuntu and Windows again and fix a "won't start" bug.
-----------------------------
-Fixed default on Windows without existing configuration.
-Tested on Kubuntu.
-----------------------------
-Rename stylesheetFix->alternateRows.
-Little different restart message.
-Tested on Kubuntu.
--
https://code.launchpad.net/~patrick-zakweb/openlp/bug-936281-newformat/+merge/140780
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/__init__.py'
--- openlp/core/__init__.py 2012-12-07 19:43:53 +0000
+++ openlp/core/__init__.py 2012-12-19 22:29:30 +0000
@@ -124,11 +124,15 @@
if FirstTimeForm(screens).exec_() == QtGui.QDialog.Accepted:
Settings().setValue(u'general/has run wizard', QtCore.QVariant(True))
# Correct stylesheet bugs
- if os.name == u'nt':
+ application_stylesheet = u''
+ if Settings().value(u'advanced/alternate rows', QtCore.QVariant(sys.platform.startswith(u'win'))).toBool():
base_color = self.palette().color(QtGui.QPalette.Active, QtGui.QPalette.Base)
- application_stylesheet = \
+ alternate_rows_repair_stylesheet = \
u'QTableWidget, QListWidget, QTreeWidget {alternate-background-color: ' + base_color.name() + ';}\n'
+ application_stylesheet += alternate_rows_repair_stylesheet
+ if os.name == u'nt':
application_stylesheet += nt_repair_stylesheet
+ if application_stylesheet:
self.setStyleSheet(application_stylesheet)
# show the splashscreen
show_splash = Settings().value(u'general/show splash', QtCore.QVariant(True)).toBool()
=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py 2012-12-05 06:13:34 +0000
+++ openlp/core/ui/advancedtab.py 2012-12-19 22:29:30 +0000
@@ -276,14 +276,18 @@
self.nextItemRadioButton.setObjectName(u'nextItemRadioButton')
self.slideLayout.addWidget(self.nextItemRadioButton)
self.rightLayout.addWidget(self.slideGroupBox)
- self.x11GroupBox = QtGui.QGroupBox(self.leftColumn)
- self.x11GroupBox.setObjectName(u'x11GroupBox')
- self.x11Layout = QtGui.QVBoxLayout(self.x11GroupBox)
- self.x11Layout.setObjectName(u'x11Layout')
- self.x11BypassCheckBox = QtGui.QCheckBox(self.x11GroupBox)
+ # Workarounds
+ self.workaroundGroupBox = QtGui.QGroupBox(self.leftColumn)
+ self.workaroundGroupBox.setObjectName(u'workaroundGroupBox')
+ self.workaroundLayout = QtGui.QVBoxLayout(self.workaroundGroupBox)
+ self.workaroundLayout.setObjectName(u'workaroundLayout')
+ self.x11BypassCheckBox = QtGui.QCheckBox(self.workaroundGroupBox)
self.x11BypassCheckBox.setObjectName(u'x11BypassCheckBox')
- self.x11Layout.addWidget(self.x11BypassCheckBox)
- self.rightLayout.addWidget(self.x11GroupBox)
+ self.workaroundLayout.addWidget(self.x11BypassCheckBox)
+ self.alternateRowsCheckBox = QtGui.QCheckBox(self.workaroundGroupBox)
+ self.alternateRowsCheckBox.setObjectName(u'alternateRowsCheckBox')
+ self.workaroundLayout.addWidget(self.alternateRowsCheckBox)
+ self.rightLayout.addWidget(self.workaroundGroupBox)
self.rightLayout.addStretch()
self.shouldUpdateServiceNameExample = False
QtCore.QObject.connect(self.serviceNameCheckBox,
@@ -308,6 +312,8 @@
QtCore.SIGNAL(u'clicked()'), self.onDefaultRevertButtonClicked)
QtCore.QObject.connect(self.x11BypassCheckBox,
QtCore.SIGNAL(u'toggled(bool)'), self.onX11BypassCheckBoxToggled)
+ QtCore.QObject.connect(self.alternateRowsCheckBox,
+ QtCore.SIGNAL(u'toggled(bool)'), self.onAlternateRowsCheckBoxToggled)
QtCore.QObject.connect(self.dataDirectoryBrowseButton,
QtCore.SIGNAL(u'clicked()'),
self.onDataDirectoryBrowseButtonClicked)
@@ -424,9 +430,11 @@
translate('OpenLP.AdvancedTab',
'<strong>WARNING:</strong> New data directory location contains '
'OpenLP data files. These files WILL be replaced during a copy.'))
- self.x11GroupBox.setTitle(translate('OpenLP.AdvancedTab', 'X11'))
+ self.workaroundGroupBox.setTitle(translate('OpenLP.AdvancedTab', 'Workarounds'))
self.x11BypassCheckBox.setText(translate('OpenLP.AdvancedTab',
'Bypass X11 Window Manager'))
+ self.alternateRowsCheckBox.setText(translate('OpenLP.AdvancedTab',
+ 'Disable alternating row colors in lists'))
# Slide Limits
self.slideGroupBox.setTitle(
translate('OpenLP.GeneralTab', 'Service Item Slide Limits'))
@@ -492,6 +500,13 @@
os.environ.get(u'GNOME_DESKTOP_SESSION_ID'))
self.x11BypassCheckBox.setChecked(settings.value(
u'x11 bypass wm', QtCore.QVariant(x11_bypass_default)).toBool())
+ # Fix for bug #936281.
+ # Prevent the dialog displayed by the alternateRowsCheckBox to display.
+ signalsBlocked = self.alternateRowsCheckBox.blockSignals(True)
+ self.alternateRowsCheckBox.setChecked(settings.value(
+ u'alternate rows', QtCore.QVariant(
+ sys.platform.startswith(u'win'))).toBool())
+ self.alternateRowsCheckBox.blockSignals(signalsBlocked)
self.defaultColor = settings.value(u'default color',
QtCore.QVariant(u'#ffffff')).toString()
self.defaultFileEdit.setText(settings.value(u'default image',
@@ -582,6 +597,8 @@
QtCore.QVariant(self.hideMouseCheckBox.isChecked()))
settings.setValue(u'x11 bypass wm',
QtCore.QVariant(self.x11BypassCheckBox.isChecked()))
+ settings.setValue(u'alternate rows',
+ QtCore.QVariant(self.alternateRowsCheckBox.isChecked()))
settings.setValue(u'default color', self.defaultColor)
settings.setValue(u'default image', self.defaultFileEdit.text())
settings.setValue(u'slide limits', QtCore.QVariant(self.slide_limits))
@@ -786,6 +803,18 @@
The state of the check box (boolean).
"""
self.displayChanged = True
+
+ def onAlternateRowsCheckBoxToggled(self, checked):
+ """
+ Notify user about required restart.
+
+ ``checked``
+ The state of the check box (boolean).
+ """
+ QtGui.QMessageBox.information(self,
+ translate('OpenLP.AdvancedTab', 'Restart Required'),
+ translate('OpenLP.AdvancedTab',
+ 'This change will only take effect once OpenLP has been restarted.'))
def onEndSlideButtonClicked(self):
self.slide_limits = SlideLimits.End
Follow ups