Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: debugger context menus not working on Mac #69176

Closed
roseman mannequin opened this issue Sep 2, 2015 · 8 comments
Closed

IDLE: debugger context menus not working on Mac #69176

roseman mannequin opened this issue Sep 2, 2015 · 8 comments
Assignees
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@roseman
Copy link
Mannequin

roseman mannequin commented Sep 2, 2015

BPO 24988
Nosy @terryjreedy, @kbkaiser, @ned-deily, @serwy, @roseman
Files
  • debug-mac-context-menu.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = <Date 2015-09-26.23:16:39.456>
    created_at = <Date 2015-09-02.23:10:11.109>
    labels = ['expert-IDLE', 'type-bug']
    title = 'IDLE: debugger context menus not working on Mac'
    updated_at = <Date 2015-09-26.23:16:50.046>
    user = 'https://github.com/roseman'

    bugs.python.org fields:

    activity = <Date 2015-09-26.23:16:50.046>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2015-09-26.23:16:39.456>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2015-09-02.23:10:11.109>
    creator = 'markroseman'
    dependencies = []
    files = ['40325']
    hgrepos = []
    issue_num = 24988
    keywords = ['patch']
    message_count = 8.0
    messages = ['249582', '249595', '249597', '249670', '249679', '249680', '251667', '251670']
    nosy_count = 6.0
    nosy_names = ['terry.reedy', 'kbk', 'ned.deily', 'roger.serwy', 'markroseman', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue24988'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5', 'Python 3.6']

    @roseman
    Copy link
    Mannequin Author

    roseman mannequin commented Sep 2, 2015

    Right menu button to invoke context menu (as well as alternative control-click) not set up correctly for Mac in the debugger. Patch attached.

    @roseman roseman mannequin added topic-IDLE type-bug An unexpected behavior, bug, or error labels Sep 2, 2015
    @terryjreedy
    Copy link
    Member

    Ned, can you check this Idle-Mac patch?

    I presume the same code is used elsewhere. It might be nice to encapsulate it sometime, though I am not sure where to put a context-bind function.

    @terryjreedy
    Copy link
    Member

    'Goto source line' works on Win7. Show stackframe does not do anything that I can see, and seems perhaps redundant.

    @roseman
    Copy link
    Mannequin Author

    roseman mannequin commented Sep 3, 2015

    Terry, the new code I've proposed includes a "tkextras" module that is a good place for these sort of little convenience functions.

    @terryjreedy
    Copy link
    Member

    The standard on Windows is to bring up a context menu on right-button-release, not on r-b-press. What about linux and mac?

    Thunderbird and Notepad++ move the insertion cursor on rb-press, That is the paste position even if the mouse is moved before release. Notepad does not move the insert cursor. MS Word is confusing, erasing the cursor when the menu is displayed and moving it when the menu goes away.

    EditorWindow.py has this code for context menu event binding:

            if macosxSupport.isAquaTk():
                # Some OS X systems have only one mouse button,
                # so use control-click for pulldown menus there.
                #  (Note, AquaTk defines <2> as the right button if
                #   present and the Tk Text widget already binds <2>.)
                text.bind("<Control-Button-1>",self.right_menu_event)
            else:
                # Elsewhere, use right-click for pulldown menus.
                text.bind("<3>",self.right_menu_event)

    Testing with my middle button, a press and release act the same as left click to move the insertion cursor to the mouse cursor. Moving my mouse while holding the middle button down moves the text pane within the text window. The insertion cursor is not moved. This is pretty much redundant with using the scroll wheel or scroll bar.

    Would it confuse Mac users to have rt-click for context menu only work in debugger? Could we make rt-click work in editor windows by recording position or time on press and compare position or time on release?

    @terryjreedy
    Copy link
    Member

    I just found bpo-24801 which addressed the editor issue.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 26, 2015

    New changeset bf11034f0291 by Terry Jan Reedy in branch '2.7':
    Issue bpo-24988: Idle ScrolledList context menus (used in debugger)
    https://hg.python.org/cpython/rev/bf11034f0291

    New changeset 85a4c95ad02f by Terry Jan Reedy in branch '3.4':
    Issue bpo-24988: Idle ScrolledList context menus (used in debugger)
    https://hg.python.org/cpython/rev/85a4c95ad02f

    @terryjreedy
    Copy link
    Member

    Opened bpo-25244 to consider changing exact right-click behavior.

    @terryjreedy terryjreedy self-assigned this Sep 26, 2015
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant