From ef6e68c4d40d4f851dba41c2887d11fc0a0a9687 2011-10-17 08:46:51
From: Matthias BUSSONNIER <bussonniermatthias@gmail.com>
Date: 2011-10-17 08:46:51
Subject: [PATCH] move tab management to "Kernel" menu

---

diff --git a/IPython/frontend/qt/console/qtconsoleapp.py b/IPython/frontend/qt/console/qtconsoleapp.py
index 4e022e2..59ec0b8 100644
--- a/IPython/frontend/qt/console/qtconsoleapp.py
+++ b/IPython/frontend/qt/console/qtconsoleapp.py
@@ -326,6 +326,7 @@ class MainWindow(QtGui.QMainWindow):
         #create menu in the order they should appear in the menu bar
         self.file_menu = self.menuBar().addMenu("&File")
         self.edit_menu = self.menuBar().addMenu("&Edit")
+        self.kernel_menu = self.menuBar().addMenu("&Kernel")
         self.window_menu = self.menuBar().addMenu("&Window")
         self.magic_menu = self.menuBar().addMenu("&Magic")
         self.all_magic_menu = self.magic_menu.addMenu("&All Magic")
@@ -1050,14 +1051,14 @@ class IPythonQtConsoleApp(BaseIPythonApplication):
             self.window,
             shortcut="Ctrl+T",
             triggered=self.create_tab_with_new_frontend)
-        self.window.window_menu.addAction(self.tabAndNewKernelAct)
+        self.window.kernel_menu.addAction(self.tabAndNewKernelAct)
 
         self.tabSameKernalAct =QtGui.QAction("Tab with Sa&me kernel",
             self.window,
             shortcut="Ctrl+Shift+T",
             triggered=self.create_tab_attached_to_current_tab_kernel)
-        self.window.window_menu.addAction(self.tabSameKernalAct)
-        self.window.window_menu.addSeparator()
+        self.window.kernel_menu.addAction(self.tabSameKernalAct)
+        self.window.kernel_menu.addSeparator()
 
         self.onlineHelpAct = QtGui.QAction("Open Online &Help",
             self.window,
@@ -1080,9 +1081,10 @@ class IPythonQtConsoleApp(BaseIPythonApplication):
 
 
             self.window_menu = self.window.window_menu
+            self.kernel_menu = self.window.kernel_menu
 
-            self.window_menu.addAction(self.next_tab_act)
-            self.window_menu.addAction(self.prev_tab_act)
+            self.kernel_menu.addAction(self.next_tab_act)
+            self.kernel_menu.addAction(self.prev_tab_act)
             self.window_menu.addSeparator()
             self.window_menu.addAction(self.minimizeAct)
             self.window_menu.addAction(self.maximizeAct)