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

Duplicate entries in IDLE "Recent Files" menu item on OS X #55206

Closed
ned-deily opened this issue Jan 24, 2011 · 3 comments
Closed

Duplicate entries in IDLE "Recent Files" menu item on OS X #55206

ned-deily opened this issue Jan 24, 2011 · 3 comments
Assignees
Labels
type-bug An unexpected behavior, bug, or error

Comments

@ned-deily
Copy link
Member

BPO 10997
Nosy @kbkaiser, @ned-deily
Files
  • issue_idle_dup_recent.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/ned-deily'
    closed_at = <Date 2012-05-29.17:53:47.088>
    created_at = <Date 2011-01-24.18:35:15.396>
    labels = ['type-bug']
    title = 'Duplicate entries in IDLE "Recent Files" menu item on OS X'
    updated_at = <Date 2012-05-29.17:53:47.087>
    user = 'https://github.com/ned-deily'

    bugs.python.org fields:

    activity = <Date 2012-05-29.17:53:47.087>
    actor = 'ned.deily'
    assignee = 'ned.deily'
    closed = True
    closed_date = <Date 2012-05-29.17:53:47.088>
    closer = 'ned.deily'
    components = []
    creation = <Date 2011-01-24.18:35:15.396>
    creator = 'ned.deily'
    dependencies = []
    files = ['20504']
    hgrepos = []
    issue_num = 10997
    keywords = ['patch']
    message_count = 3.0
    messages = ['126941', '161904', '161905']
    nosy_count = 3.0
    nosy_names = ['kbk', 'ned.deily', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue10997'
    versions = ['Python 3.1', 'Python 2.7', 'Python 3.2']

    @ned-deily
    Copy link
    Member Author

    When IDLE is run with an OS X Aqua Tk (Carbon 8.4 or Cocoa 8.5), using the File -> Recent Files menu item to open a previously used file causes that file to show up a second time in the updated menu item and with the same keyboard shortcut. With X11-based Tk on OS X, no duplicate is seen. The problem stems from a difference in the way the Tk versions generate sub menus. With the X11 Tk the sub menu appears to start with a separator in menu index 0 and the first file is added in index 1. With Aqua Tk, there is no separator and the first file is in index 0. The code in IDLE to update the menu deletes from 1 to END so, with Aqua Tk, the file name inserted into index 0 is not removed. The attached patch fixes the problem with Aqua Tk and appears to cause no problems with a current X11 Tk 8.5 on OS X. Before committing it, though, it should be tested on Windows, which I'm not currently set up to do.

    @ned-deily ned-deily self-assigned this Jan 24, 2011
    @ned-deily ned-deily added the type-bug An unexpected behavior, bug, or error label Jan 24, 2011
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 29, 2012

    New changeset 3108331c88ec by Ned Deily in branch '2.7':
    Issue bpo-10997: Prevent a duplicate entry in IDLE's "Recent Files" menu.
    http://hg.python.org/cpython/rev/3108331c88ec

    New changeset 64a7fae544a6 by Ned Deily in branch '3.2':
    Issue bpo-10997: Prevent a duplicate entry in IDLE's "Recent Files" menu.
    http://hg.python.org/cpython/rev/64a7fae544a6

    New changeset cb7421cdaec4 by Ned Deily in branch 'default':
    Issue bpo-10997: merge from 3.2
    http://hg.python.org/cpython/rev/cb7421cdaec4

    @ned-deily
    Copy link
    Member Author

    Patch applied for 2.7.4, 3.2.4, and 3.3.0.

    @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
    type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant