Better wording for close dialog

This commit is contained in:
Samuel Mehrbrodt 2015-08-26 10:37:16 +02:00
parent 2df4dad39c
commit 8d791a51f4

View File

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