From 9076a7381316dd59b51db74c1c634c1cbc3995c8 2011-08-16 02:37:42 From: MinRK Date: 2011-08-16 02:37:42 Subject: [PATCH] make calltips configurable in qtconsole adds FrontendWidget.enable_calltips configurable, with default behavior unchanged. closes gh-694, closes gh-699 (rebased). --- diff --git a/IPython/frontend/qt/console/frontend_widget.py b/IPython/frontend/qt/console/frontend_widget.py index c21b584..c8eaf32 100644 --- a/IPython/frontend/qt/console/frontend_widget.py +++ b/IPython/frontend/qt/console/frontend_widget.py @@ -75,6 +75,9 @@ class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin): """ A Qt frontend for a generic Python kernel. """ + enable_calltips = Bool(True, config=True, + help="Whether to draw information calltips on open-parentheses.") + # An option and corresponding signal for overriding the default kernel # interrupt behavior. custom_interrupt = Bool(False) @@ -508,6 +511,8 @@ class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin): """ Shows a call tip, if appropriate, at the current cursor location. """ # Decide if it makes sense to show a call tip + if not self.enable_calltips: + return False cursor = self._get_cursor() cursor.movePosition(QtGui.QTextCursor.Left) if cursor.document().characterAt(cursor.position()) != '(':