forked from openlp/openlp
Add muppet exit guard
This commit is contained in:
parent
89a2280f4e
commit
8cdf4d39bf
@ -825,8 +825,18 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
else:
|
else:
|
||||||
event.ignore()
|
event.ignore()
|
||||||
else:
|
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()
|
self.cleanUp()
|
||||||
event.accept()
|
event.accept()
|
||||||
|
else:
|
||||||
|
event.ignore()
|
||||||
|
|
||||||
def cleanUp(self):
|
def cleanUp(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user