Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

make calltips configurable in qtconsole #699

Closed
wants to merge 1 commit into from

2 participants

@minrk
Owner

adds FrontendWidget.enable_calltips configurable, so users can disable the calltips.

Should close #694

@minrk minrk make calltips configurable in qtconsole
adds FrontendWidget.enable_calltips configurable, with default behavior unchanged.

closes gh-694
f1c6119
@fperez
Owner

+1, merge.

@minrk minrk closed this pull request from a commit
@minrk minrk make calltips configurable in qtconsole
adds FrontendWidget.enable_calltips configurable, with default behavior unchanged.

closes gh-694, closes gh-699 (rebased).
9076a73
@minrk minrk closed this in 9076a73
@fperez
Owner

Done, I simply rebased to avoid the merge handle for just one commit.

@fperez fperez referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@mattvonrocketstein mattvonrocketstein referenced this pull request from a commit in mattvonrocketstein/ipython
@minrk minrk make calltips configurable in qtconsole
adds FrontendWidget.enable_calltips configurable, with default behavior unchanged.

closes gh-694, closes gh-699 (rebased).
e2d408e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 15, 2011
  1. @minrk

    make calltips configurable in qtconsole

    minrk authored
    adds FrontendWidget.enable_calltips configurable, with default behavior unchanged.
    
    closes gh-694
This page is out of date. Refresh to see the latest.
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()) != '(':
Something went wrong with that request. Please try again.