forked from openlp/openlp
Confirm deletion of theme
This commit is contained in:
parent
ba5e743300
commit
d1c41fae7a
@ -211,6 +211,14 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
'You must select a theme to delete.')):
|
'You must select a theme to delete.')):
|
||||||
item = self.ThemeListWidget.currentItem()
|
item = self.ThemeListWidget.currentItem()
|
||||||
theme = unicode(item.text())
|
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
|
# should be the same unless default
|
||||||
if theme != unicode(item.data(QtCore.Qt.UserRole).toString()):
|
if theme != unicode(item.data(QtCore.Qt.UserRole).toString()):
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
|
Loading…
Reference in New Issue
Block a user