Add muppet exit guard

This commit is contained in:
Tim Bentley 2010-12-29 12:45:16 +00:00
parent 89a2280f4e
commit 8cdf4d39bf

View File

@ -825,8 +825,18 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
else:
event.ignore()
else:
ret = QtGui.QMessageBox.question(self,
translate('OpenLP.MainWindow', 'Close OpenLP'),
translate('OpenLP.MainWindow', 'Are you sure you want to Exit.'),
QtGui.QMessageBox.StandardButtons(
QtGui.QMessageBox.Cancel |
QtGui.QMessageBox.Ok),
QtGui.QMessageBox.Ok)
if ret == QtGui.QMessageBox.Ok:
self.cleanUp()
event.accept()
else:
event.ignore()
def cleanUp(self):
"""