forked from openlp/openlp
Fix up theme popups
bzr-revno: 1273
This commit is contained in:
commit
bb31adfc6e
@ -260,7 +260,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
'You must select a theme to rename.')),
|
'You must select a theme to rename.')),
|
||||||
unicode(translate('OpenLP.ThemeManager', 'Rename Confirmation')),
|
unicode(translate('OpenLP.ThemeManager', 'Rename Confirmation')),
|
||||||
unicode(translate('OpenLP.ThemeManager', 'Rename %s theme?')),
|
unicode(translate('OpenLP.ThemeManager', 'Rename %s theme?')),
|
||||||
False):
|
False, False):
|
||||||
item = self.themeListWidget.currentItem()
|
item = self.themeListWidget.currentItem()
|
||||||
oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||||
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
|
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
|
||||||
@ -676,7 +676,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
return theme
|
return theme
|
||||||
|
|
||||||
def _validate_theme_action(self, select_text, confirm_title, confirm_text,
|
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
|
Check to see if theme has been selected and the destructive action
|
||||||
is allowed.
|
is allowed.
|
||||||
@ -688,12 +688,13 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
item = self.themeListWidget.currentItem()
|
item = self.themeListWidget.currentItem()
|
||||||
theme = unicode(item.text())
|
theme = unicode(item.text())
|
||||||
# confirm deletion
|
# confirm deletion
|
||||||
answer = QtGui.QMessageBox.question(self, confirm_title,
|
if confirm:
|
||||||
confirm_text % theme, QtGui.QMessageBox.StandardButtons(
|
answer = QtGui.QMessageBox.question(self, confirm_title,
|
||||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
|
confirm_text % theme, QtGui.QMessageBox.StandardButtons(
|
||||||
QtGui.QMessageBox.No)
|
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
|
||||||
if answer == QtGui.QMessageBox.No:
|
QtGui.QMessageBox.No)
|
||||||
return False
|
if answer == QtGui.QMessageBox.No:
|
||||||
|
return False
|
||||||
# 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()):
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
|
Loading…
Reference in New Issue
Block a user