Permalink
Browse files

clarify close dialog on qtconsole

Notes that kernels not started by the qtconsole will not be affected,
and has singular message rather than 'all tabs' when only one tab
exists.

closes gh-946
  • Loading branch information...
minrk committed Nov 2, 2011
1 parent 71b3a3d commit dbc15c11fe49218b16521c08cbd425d50f13aeb1
Showing with 6 additions and 2 deletions.
  1. +6 −2 IPython/frontend/qt/console/mainwindow.py
@@ -818,12 +818,16 @@ def closeEvent(self, event):
okay = QtGui.QMessageBox.Ok
if self.confirm_exit:
- msg = "Close all tabs, stop all kernels, and Quit?"
+ if self.tab_widget.count() > 1:
+ msg = "Close all tabs, stop all kernels, and Quit?"
+ else:
+ msg = "Close console, stop kernel, and Quit?"
+ info = "Kernels not started here (e.g. notebooks) will be left alone."
closeall = QtGui.QPushButton("&Yes, quit everything", self)
closeall.setShortcut('Y')
box = QtGui.QMessageBox(QtGui.QMessageBox.Question,
title, msg)
- # box.setInformativeText(info)
+ box.setInformativeText(info)
box.addButton(cancel)
box.addButton(closeall, QtGui.QMessageBox.YesRole)
box.setDefaultButton(closeall)

0 comments on commit dbc15c1

Please sign in to comment.