From 3bb309e6238128086597ae4b1beb27403e24ef60 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 2 Jan 2011 17:20:53 +0000 Subject: [PATCH] Block delete of default theme --- openlp/core/ui/thememanager.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 7cfdb9aae..94a440d81 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -684,6 +684,13 @@ class ThemeManager(QtGui.QWidget): 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()): + QtGui.QMessageBox.critical(self, + translate('OpenLP.ThemeManager', 'Error'), + translate('OpenLP.ThemeManager', + 'You are unable to delete the default theme.')) + return False # check for use in the system else where. if testPlugin: for plugin in self.parent.pluginManager.plugins: