From 9a0ef7371060d61415f02526caaa3916a6083d28 2014-08-02 19:41:25 From: Matthias Bussonnier Date: 2014-08-02 19:41:25 Subject: [PATCH] Merge pull request #6261 from blink1073/master Allow either okay or accept_role to be returned by QtConsole confirm exit. --- diff --git a/IPython/qt/console/mainwindow.py b/IPython/qt/console/mainwindow.py index 8490265..b48a492 100644 --- a/IPython/qt/console/mainwindow.py +++ b/IPython/qt/console/mainwindow.py @@ -892,6 +892,7 @@ class MainWindow(QtGui.QMainWindow): title = self.window().windowTitle() cancel = QtGui.QMessageBox.Cancel okay = QtGui.QMessageBox.Ok + accept_role = QtGui.QMessageBox.AcceptRole if self.confirm_exit: if self.tab_widget.count() > 1: @@ -917,7 +918,7 @@ class MainWindow(QtGui.QMainWindow): if reply == cancel: event.ignore() return - if reply == okay: + if reply == okay or reply == accept_role: while self.tab_widget.count() >= 1: # prevent further confirmations: widget = self.active_frontend