openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #05390
[Merge] lp:~m2j/openlp/work into lp:openlp
m2j has proposed merging lp:~m2j/openlp/work into lp:openlp.
Requested reviews:
Tim Bentley (trb143)
Related bugs:
#609356 Web bibles don't download all their books on import
https://bugs.launchpad.net/bugs/609356
#661867 Invalid author added in song dialog
https://bugs.launchpad.net/bugs/661867
#686103 Labels in theme wizard out of alignment on Windows
https://bugs.launchpad.net/bugs/686103
#698881 Saving settings tries to use uno when unavailable
https://bugs.launchpad.net/bugs/698881
For more details, see:
https://code.launchpad.net/~m2j/openlp/work/+merge/45506
Bug #698881 (accessing unavailable presentation controller)
Keep settings if the controller is not available
Add explaining text to unavailable controllers checkButton
--
https://code.launchpad.net/~m2j/openlp/work/+merge/45506
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py 2011-01-03 11:25:30 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py 2011-01-07 11:34:54 +0000
@@ -79,7 +79,12 @@
for key in self.controllers:
controller = self.controllers[key]
checkbox = self.PresenterCheckboxes[controller.name]
- checkbox.setText(controller.name)
+ if controller.available:
+ checkbox.setText(controller.name)
+ else:
+ checkbox.setText(
+ unicode(translate('PresentationPlugin.PresentationTab',
+ '%s (unvailable)')) % controller.name)
self.AdvancedGroupBox.setTitle(
translate('PresentationPlugin.PresentationTab',
'Advanced'))
@@ -93,11 +98,10 @@
"""
for key in self.controllers:
controller = self.controllers[key]
- if controller.available:
- checkbox = self.PresenterCheckboxes[controller.name]
- checkbox.setChecked(QtCore.QSettings().value(
- self.settingsSection + u'/' + controller.name,
- QtCore.QVariant(QtCore.Qt.Checked)).toInt()[0])
+ checkbox = self.PresenterCheckboxes[controller.name]
+ checkbox.setChecked(QtCore.QSettings().value(
+ self.settingsSection + u'/' + controller.name,
+ QtCore.QVariant(QtCore.Qt.Checked)).toInt()[0])
self.OverrideAppCheckBox.setChecked(QtCore.QSettings().value(
self.settingsSection + u'/override app',
QtCore.QVariant(QtCore.Qt.Unchecked)).toInt()[0])
@@ -109,16 +113,17 @@
changed = False
for key in self.controllers:
controller = self.controllers[key]
- checkbox = self.PresenterCheckboxes[controller.name]
- setting_key = self.settingsSection + u'/' + controller.name
- if QtCore.QSettings().value(setting_key) != checkbox.checkState():
- changed = True
- QtCore.QSettings().setValue(setting_key,
- QtCore.QVariant(checkbox.checkState()))
- if checkbox.checkState() == QtCore.Qt.Checked:
- controller.start_process()
- else:
- controller.kill()
+ if controller.available:
+ checkbox = self.PresenterCheckboxes[controller.name]
+ setting_key = self.settingsSection + u'/' + controller.name
+ if QtCore.QSettings().value(setting_key) != checkbox.checkState():
+ changed = True
+ QtCore.QSettings().setValue(setting_key,
+ QtCore.QVariant(checkbox.checkState()))
+ if checkbox.isChecked():
+ controller.start_process()
+ else:
+ controller.kill()
setting_key = self.settingsSection + u'/override app'
if QtCore.QSettings().value(setting_key) != \
self.OverrideAppCheckBox.checkState():
Follow ups