Permalink
Browse files

added 3rd keep-kernel option to shutdown dialog

  • Loading branch information...
1 parent b286d0e commit cdb78a95f99540790cdf7960e52941d2ef1af2a3 @minrk committed Oct 8, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 IPython/frontend/qt/console/ipythonqt.py
@@ -50,8 +50,12 @@ def closeEvent(self, event):
if kernel_manager and kernel_manager.channels_running:
title = self.window().windowTitle()
reply = QtGui.QMessageBox.question(self, title,
- 'Close console?', QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
+ 'Closing console. Leave Kernel alive?',
+ QtGui.QMessageBox.Yes, QtGui.QMessageBox.No, QtGui.QMessageBox.Cancel)
if reply == QtGui.QMessageBox.Yes:
+ self.destroy()
+ event.ignore()
+ elif reply == QtGui.QMessageBox.No:
kernel_manager.shutdown_kernel()
#kernel_manager.stop_channels()
event.accept()

0 comments on commit cdb78a9

Please sign in to comment.