Show More
@@ -11,6 +11,7 b' Authors:' | |||||
11 | * Fernando Perez |
|
11 | * Fernando Perez | |
12 | * Bussonnier Matthias |
|
12 | * Bussonnier Matthias | |
13 | * Thomas Kluyver |
|
13 | * Thomas Kluyver | |
|
14 | * Paul Ivanov | |||
14 |
|
15 | |||
15 | """ |
|
16 | """ | |
16 |
|
17 | |||
@@ -77,6 +78,7 b' class MainWindow(QtGui.QMainWindow):' | |||||
77 | self.tab_widget.setDocumentMode(True) |
|
78 | self.tab_widget.setDocumentMode(True) | |
78 | self.tab_widget.setTabsClosable(True) |
|
79 | self.tab_widget.setTabsClosable(True) | |
79 | self.tab_widget.tabCloseRequested[int].connect(self.close_tab) |
|
80 | self.tab_widget.tabCloseRequested[int].connect(self.close_tab) | |
|
81 | self.tab_widget.currentChanged.connect(self.update_restart_checkbox) | |||
80 |
|
82 | |||
81 | self.setCentralWidget(self.tab_widget) |
|
83 | self.setCentralWidget(self.tab_widget) | |
82 | # hide tab bar at first, since we have no tabs: |
|
84 | # hide tab bar at first, since we have no tabs: | |
@@ -844,12 +846,11 b' class MainWindow(QtGui.QMainWindow):' | |||||
844 | def toggle_confirm_restart_active_frontend(self): |
|
846 | def toggle_confirm_restart_active_frontend(self): | |
845 | widget = self.active_frontend |
|
847 | widget = self.active_frontend | |
846 | widget.confirm_restart = not widget.confirm_restart |
|
848 | widget.confirm_restart = not widget.confirm_restart | |
847 | # XXX: whenever tabs are switched, the checkbox may not be |
|
|||
848 | # representative of the state of the active widget. The next line |
|
|||
849 | # ensures that at least after toggling, the checkbox represents the |
|
|||
850 | # state this widget is in. |
|
|||
851 | self.confirm_restart_kernel_action.setChecked(widget.confirm_restart) |
|
849 | self.confirm_restart_kernel_action.setChecked(widget.confirm_restart) | |
852 |
|
850 | |||
|
851 | def update_restart_checkbox(self): | |||
|
852 | widget = self.active_frontend | |||
|
853 | self.confirm_restart_kernel_action.setChecked(widget.confirm_restart) | |||
853 |
|
854 | |||
854 | def cut_active_frontend(self): |
|
855 | def cut_active_frontend(self): | |
855 | widget = self.active_frontend |
|
856 | widget = self.active_frontend |
General Comments 0
You need to be logged in to leave comments.
Login now