Browse files

make calltips configurable in qtconsole

adds FrontendWidget.enable_calltips configurable, with default behavior unchanged.

closes gh-694
  • Loading branch information...
1 parent 32f3d05 commit f1c6119d9735423b1eac90f8e431c8f5372c65e0 @minrk committed Aug 15, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 IPython/frontend/qt/console/frontend_widget.py
View
5 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 @@ def _call_tip(self):
""" 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()) != '(':

0 comments on commit f1c6119

Please sign in to comment.