Better wording for close dialog

This commit is contained in:
Samuel Mehrbrodt 2015-08-26 10:37:16 +02:00
parent 2df4dad39c
commit 8d791a51f4
1 changed files with 6 additions and 5 deletions

View File

@ -1082,13 +1082,14 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow, RegistryProperties):
event.ignore()
else:
if Settings().value('advanced/enable exit confirmation'):
ret = QtGui.QMessageBox.question(self, translate('OpenLP.MainWindow', 'Close OpenLP'),
msg_box = QtGui.QMessageBox(QtGui.QMessageBox.Question, translate('OpenLP.MainWindow', 'Close OpenLP'),
translate('OpenLP.MainWindow', 'Are you sure you want to close '
'OpenLP?'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes |
QtGui.QMessageBox.No),
QtGui.QMessageBox.Yes)
if ret == QtGui.QMessageBox.Yes:
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Close |
QtGui.QMessageBox.Cancel), self)
msg_box.setButtonText(QtGui.QMessageBox.Close, translate('OpenLP.MainWindow', 'Close OpenLP'))
msg_box.setDefaultButton(QtGui.QMessageBox.Close)
if msg_box.exec() == QtGui.QMessageBox.Close:
self.clean_up()
event.accept()
else: