##// END OF EJS Templates
Expose configuration to start qtconsole maximized and hide the menu bar on startup
Dan Kilman -
Show More
@@ -166,6 +166,12 b' class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):'
166 stylesheet = Unicode('', config=True,
166 stylesheet = Unicode('', config=True,
167 help="path to a custom CSS stylesheet")
167 help="path to a custom CSS stylesheet")
168
168
169 hide_menubar = CBool(False, config=True,
170 help="Start the console window with the menu bar hidden.")
171
172 maximize = CBool(False, config=True,
173 help="Start the console window maximized.")
174
169 plain = CBool(False, config=True,
175 plain = CBool(False, config=True,
170 help="Use a plaintext widget instead of rich text (plain can't print/save).")
176 help="Use a plaintext widget instead of rich text (plain can't print/save).")
171
177
@@ -269,6 +275,10 b' class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):'
269 self.window.add_tab_with_frontend(self.widget)
275 self.window.add_tab_with_frontend(self.widget)
270 self.window.init_menu_bar()
276 self.window.init_menu_bar()
271
277
278 # Ignore on OSX, where there is always a menu bar
279 if sys.platform != 'darwin' and self.hide_menubar:
280 self.window.menuBar().setVisible(False)
281
272 self.window.setWindowTitle('IPython')
282 self.window.setWindowTitle('IPython')
273
283
274 def init_colors(self, widget):
284 def init_colors(self, widget):
@@ -355,7 +365,10 b' class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):'
355 def start(self):
365 def start(self):
356
366
357 # draw the window
367 # draw the window
358 self.window.show()
368 if self.maximize:
369 self.window.showMaximized()
370 else:
371 self.window.show()
359 self.window.raise_()
372 self.window.raise_()
360
373
361 # Start the application main loop.
374 # Start the application main loop.
General Comments 0
You need to be logged in to leave comments. Login now