##// END OF EJS Templates
Merge pull request #7094 from helenst/qtconsole-no-banner...
Kyle Kelley -
r19192:7fa9c4cd merge
parent child Browse files
Show More
@@ -615,10 +615,11 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):'
615
615
616 if clear:
616 if clear:
617 self._control.clear()
617 self._control.clear()
618 self._append_plain_text(self.banner)
618 if self._display_banner:
619 if self.kernel_banner:
619 self._append_plain_text(self.banner)
620 self._append_plain_text(self.kernel_banner)
620 if self.kernel_banner:
621
621 self._append_plain_text(self.kernel_banner)
622
622 # update output marker for stdout/stderr, so that startup
623 # update output marker for stdout/stderr, so that startup
623 # messages appear after banner:
624 # messages appear after banner:
624 self._append_before_prompt_pos = self._get_cursor().position()
625 self._append_before_prompt_pos = self._get_cursor().position()
@@ -50,6 +50,7 b" if os.name == 'nt':"
50 from IPython.external.qt import QtCore, QtGui
50 from IPython.external.qt import QtCore, QtGui
51
51
52 # Local imports
52 # Local imports
53 from IPython.config.application import boolean_flag
53 from IPython.config.application import catch_config_error
54 from IPython.config.application import catch_config_error
54 from IPython.core.application import BaseIPythonApplication
55 from IPython.core.application import BaseIPythonApplication
55 from IPython.qt.console.ipython_widget import IPythonWidget
56 from IPython.qt.console.ipython_widget import IPythonWidget
@@ -91,6 +92,11 b' qt_flags = {'
91 'plain' : ({'IPythonQtConsoleApp' : {'plain' : True}},
92 'plain' : ({'IPythonQtConsoleApp' : {'plain' : True}},
92 "Disable rich text support."),
93 "Disable rich text support."),
93 }
94 }
95 qt_flags.update(boolean_flag(
96 'banner', 'IPythonQtConsoleApp.display_banner',
97 "Display a banner upon starting the QtConsole.",
98 "Don't display a banner upon starting the QtConsole."
99 ))
94
100
95 # and app_flags from the Console Mixin
101 # and app_flags from the Console Mixin
96 qt_flags.update(app_flags)
102 qt_flags.update(app_flags)
@@ -168,6 +174,10 b' class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):'
168 plain = CBool(False, config=True,
174 plain = CBool(False, config=True,
169 help="Use a plaintext widget instead of rich text (plain can't print/save).")
175 help="Use a plaintext widget instead of rich text (plain can't print/save).")
170
176
177 display_banner = CBool(True, config=True,
178 help="Whether to display a banner upon starting the QtConsole."
179 )
180
171 def _plain_changed(self, name, old, new):
181 def _plain_changed(self, name, old, new):
172 kind = 'plain' if new else 'rich'
182 kind = 'plain' if new else 'rich'
173 self.config.ConsoleWidget.kind = kind
183 self.config.ConsoleWidget.kind = kind
@@ -255,6 +265,7 b' class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):'
255 self.widget._existing = self.existing
265 self.widget._existing = self.existing
256 self.widget._may_close = not self.existing
266 self.widget._may_close = not self.existing
257 self.widget._confirm_exit = self.confirm_exit
267 self.widget._confirm_exit = self.confirm_exit
268 self.widget._display_banner = self.display_banner
258
269
259 self.widget.kernel_manager = self.kernel_manager
270 self.widget.kernel_manager = self.kernel_manager
260 self.widget.kernel_client = self.kernel_client
271 self.widget.kernel_client = self.kernel_client
General Comments 0
You need to be logged in to leave comments. Login now