##// END OF EJS Templates
decamelcasify: 3 more changes
Matthias BUSSONNIER -
Show More
@@ -97,9 +97,9 b' class MainWindow(QtGui.QMainWindow):'
97 self.tab_widget.tabCloseRequested[int].connect(self.close_tab)
97 self.tab_widget.tabCloseRequested[int].connect(self.close_tab)
98
98
99 self.setCentralWidget(self.tab_widget)
99 self.setCentralWidget(self.tab_widget)
100 self.updateTabBarVisibility()
100 self.update_tab_bar_visibility()
101
101
102 def updateTabBarVisibility(self):
102 def update_tab_bar_visibility(self):
103 """ update visibility of the tabBar depending of the number of tab
103 """ update visibility of the tabBar depending of the number of tab
104
104
105 0 or 1 tab, tabBar hidden
105 0 or 1 tab, tabBar hidden
@@ -223,7 +223,7 b' class MainWindow(QtGui.QMainWindow):'
223 self.tab_widget.removeTab(self.tab_widget.indexOf(slave))
223 self.tab_widget.removeTab(self.tab_widget.indexOf(slave))
224 self.tab_widget.removeTab(currentTab)
224 self.tab_widget.removeTab(currentTab)
225 kernel_manager.shutdown_kernel()
225 kernel_manager.shutdown_kernel()
226 self.updateTabBarVisibility()
226 self.update_tab_bar_visibility()
227
227
228 def addTabWithFrontend(self,frontend,name=None):
228 def addTabWithFrontend(self,frontend,name=None):
229 """ insert a tab with a given frontend in the tab bar, and give it a name
229 """ insert a tab with a given frontend in the tab bar, and give it a name
@@ -232,14 +232,14 b' class MainWindow(QtGui.QMainWindow):'
232 if not name:
232 if not name:
233 name=str('kernel '+str(self.tab_widget.count()))
233 name=str('kernel '+str(self.tab_widget.count()))
234 self.tab_widget.addTab(frontend,name)
234 self.tab_widget.addTab(frontend,name)
235 self.updateTabBarVisibility()
235 self.update_tab_bar_visibility()
236 self.makeFrontendVisible(frontend)
236 self.makeFrontendVisible(frontend)
237 frontend.exit_requested.connect(self.close_tab)
237 frontend.exit_requested.connect(self.close_tab)
238
238
239 def nextTab(self):
239 def next_tab(self):
240 self.tab_widget.setCurrentIndex((self.tab_widget.currentIndex()+1))
240 self.tab_widget.setCurrentIndex((self.tab_widget.currentIndex()+1))
241
241
242 def prevTab(self):
242 def prev_tab(self):
243 self.tab_widget.setCurrentIndex((self.tab_widget.currentIndex()-1))
243 self.tab_widget.setCurrentIndex((self.tab_widget.currentIndex()-1))
244
244
245 def makeFrontendVisible(self,frontend):
245 def makeFrontendVisible(self,frontend):
@@ -976,17 +976,17 b' class IPythonQtConsoleApp(BaseIPythonApplication):'
976
976
977 def init_window_shortcut(self):
977 def init_window_shortcut(self):
978
978
979 self.prevTabAct = QtGui.QAction("Pre&vious Tab",
979 self.prev_tab_act = QtGui.QAction("Pre&vious Tab",
980 self.window,
980 self.window,
981 shortcut="Ctrl+PgDown",
981 shortcut="Ctrl+PgDown",
982 statusTip="Cahange to next tab",
982 statusTip="Cahange to next tab",
983 triggered=self.window.prevTab)
983 triggered=self.window.prev_tab)
984
984
985 self.nextTabAct = QtGui.QAction("Ne&xt Tab",
985 self.next_tab_act = QtGui.QAction("Ne&xt Tab",
986 self.window,
986 self.window,
987 shortcut="Ctrl+PgUp",
987 shortcut="Ctrl+PgUp",
988 statusTip="Cahange to next tab",
988 statusTip="Cahange to next tab",
989 triggered=self.window.nextTab)
989 triggered=self.window.next_tab)
990
990
991 self.fullScreenAct = QtGui.QAction("&Full Screen",
991 self.fullScreenAct = QtGui.QAction("&Full Screen",
992 self.window,
992 self.window,
@@ -1027,8 +1027,8 b' class IPythonQtConsoleApp(BaseIPythonApplication):'
1027
1027
1028 self.windowMenu = self.window.windowMenu
1028 self.windowMenu = self.window.windowMenu
1029
1029
1030 self.windowMenu.addAction(self.nextTabAct)
1030 self.windowMenu.addAction(self.next_tab_act)
1031 self.windowMenu.addAction(self.prevTabAct)
1031 self.windowMenu.addAction(self.prev_tab_act)
1032 self.windowMenu.addSeparator()
1032 self.windowMenu.addSeparator()
1033 self.windowMenu.addAction(self.minimizeAct)
1033 self.windowMenu.addAction(self.minimizeAct)
1034 self.windowMenu.addAction(self.maximizeAct)
1034 self.windowMenu.addAction(self.maximizeAct)
General Comments 0
You need to be logged in to leave comments. Login now