##// END OF EJS Templates
comment/doc logic cleanup
MinRK -
Show More
@@ -34,6 +34,9 b' class MainWindow(QtGui.QMainWindow):'
34 34 def __init__(self, app, frontend, existing=False):
35 35 """ Create a MainWindow for the specified FrontendWidget.
36 36
37 The app is passed as an argument to allow for different
38 closing behavior depending on whether we are the Kernel's parent.
39
37 40 If existing is True, then this Window does not own the Kernel.
38 41 """
39 42 super(MainWindow, self).__init__()
@@ -57,19 +60,15 b' class MainWindow(QtGui.QMainWindow):'
57 60 "Close just this console, or shutdown the kernel and close "+
58 61 "all windows attached to it?",
59 62 'Cancel', 'Close Console', 'Close All')
60 if reply == 2:
63 if reply == 2: # close All
61 64 kernel_manager.shutdown_kernel()
62 65 #kernel_manager.stop_channels()
63 66 event.accept()
64 elif reply == 1:
65 if self._existing:
66 # I don't have the Kernel, I can shutdown
67 event.accept()
68 else:
69 # only destroy the Window, save the Kernel
67 elif reply == 1: # close Console
68 if not self._existing:
69 # I have the kernel: don't quit, just close the window
70 70 self._app.setQuitOnLastWindowClosed(False)
71 self.deleteLater()
72 event.ignore()
71 event.accept()
73 72 else:
74 73 event.ignore()
75 74
General Comments 0
You need to be logged in to leave comments. Login now