openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #06055
[Merge] lp:~trb143/openlp/bugs into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
#693150 Custom Slide Display footer option
https://bugs.launchpad.net/bugs/693150
#693202 delete theme
https://bugs.launchpad.net/bugs/693202
For more details, see:
https://code.launchpad.net/~trb143/openlp/bugs/+merge/48707
Tidy up the theme maintenance confirmation questions
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/48707
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2011-02-05 09:40:04 +0000
+++ openlp/core/ui/thememanager.py 2011-02-05 19:45:17 +0000
@@ -260,7 +260,7 @@
'You must select a theme to rename.')),
unicode(translate('OpenLP.ThemeManager', 'Rename Confirmation')),
unicode(translate('OpenLP.ThemeManager', 'Rename %s theme?')),
- False):
+ False, False):
item = self.themeListWidget.currentItem()
oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
@@ -676,7 +676,7 @@
return theme
def _validate_theme_action(self, select_text, confirm_title, confirm_text,
- testPlugin=True):
+ testPlugin=True, confirm=True):
"""
Check to see if theme has been selected and the destructive action
is allowed.
@@ -688,12 +688,13 @@
item = self.themeListWidget.currentItem()
theme = unicode(item.text())
# confirm deletion
- answer = QtGui.QMessageBox.question(self, confirm_title,
- confirm_text % theme, QtGui.QMessageBox.StandardButtons(
- QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
- QtGui.QMessageBox.No)
- if answer == QtGui.QMessageBox.No:
- return False
+ if confirm:
+ answer = QtGui.QMessageBox.question(self, confirm_title,
+ confirm_text % theme, QtGui.QMessageBox.StandardButtons(
+ QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
+ QtGui.QMessageBox.No)
+ if answer == QtGui.QMessageBox.No:
+ return False
# should be the same unless default
if theme != unicode(item.data(QtCore.Qt.UserRole).toString()):
critical_error_message_box(
Follow ups