openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #02575
[Merge] lp:~billylange/openlp/themedelete into lp:openlp
Billy Lange has proposed merging lp:~billylange/openlp/themedelete into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Confirm before deleting a theme
--
https://code.launchpad.net/~billylange/openlp/themedelete/+merge/30188
Your team OpenLP Core is requested to review the proposed merge of lp:~billylange/openlp/themedelete into lp:openlp.
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2010-07-16 12:31:47 +0000
+++ openlp/core/ui/thememanager.py 2010-07-17 20:02:41 +0000
@@ -211,6 +211,14 @@
'You must select a theme to delete.')):
item = self.ThemeListWidget.currentItem()
theme = unicode(item.text())
+ # confirm deletion
+ answer = QtGui.QMessageBox.question(self,
+ translate('ThemeManager', 'Delete Confirmation'),
+ translate('ThemeManager', 'Delete theme?'),
+ QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes |
+ QtGui.QMessageBox.No), QtGui.QMessageBox.No)
+ if answer == QtGui.QMessageBox.No:
+ return
# should be the same unless default
if theme != unicode(item.data(QtCore.Qt.UserRole).toString()):
QtGui.QMessageBox.critical(self,
Follow ups