From d1c41fae7abb32e00012730e1ddceef337e51235 Mon Sep 17 00:00:00 2001 From: Billy Lange Date: Thu, 15 Jul 2010 18:36:09 +0200 Subject: [PATCH 1/2] Confirm deletion of theme --- openlp/core/ui/thememanager.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index dd8c917af..01acf5549 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -211,6 +211,14 @@ class ThemeManager(QtGui.QWidget): '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, From ca1d6c8675c9e2a835be1f53f870480a17bb4770 Mon Sep 17 00:00:00 2001 From: Billy Lange Date: Sat, 17 Jul 2010 21:53:17 +0200 Subject: [PATCH 2/2] Fixed spaces --- openlp/core/ui/thememanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 01acf5549..02e23d75c 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -215,8 +215,8 @@ class ThemeManager(QtGui.QWidget): 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) + QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes | + QtGui.QMessageBox.No), QtGui.QMessageBox.No) if answer == QtGui.QMessageBox.No: return # should be the same unless default