Skip to content

IDLE: Remove tear-off menu feature #58092

Closed

Description

@mcgrete
mannequin
BPO 13884
Nosy @terryjreedy, @taleinat, @ned-deily, @ezio-melotti, @serwy, @roseman, @rovitotv, @serhiy-storchaka
Files
  • IDLE2.6.5_RecentFilesUndocked.png: screen capture
  • issue13884.patch
  • tearoff.patch: Remove tearoff menus
  • tearoff27.patch: Remove tearoff menus, 2.7 branch
  • 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-07-30.20:58:05.192>
    created_at = <Date 2012-01-26.23:41:03.922>
    labels = ['expert-IDLE', 'type-feature']
    title = 'IDLE: Remove tear-off menu feature'
    updated_at = <Date 2015-07-30.21:11:24.695>
    user = 'https://bugs.python.org/mcgrete'

    bugs.python.org fields:

    activity = <Date 2015-07-30.21:11:24.695>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2015-07-30.20:58:05.192>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2012-01-26.23:41:03.922>
    creator = 'mcgrete'
    dependencies = []
    files = ['24333', '24352', '40058', '40059']
    hgrepos = []
    issue_num = 13884
    keywords = ['patch']
    message_count = 16.0
    messages = ['152050', '152054', '152067', '152192', '173284', '173291', '173293', '173300', '230381', '247611', '247612', '247649', '247661', '247676', '247694', '247697']
    nosy_count = 10.0
    nosy_names = ['terry.reedy', 'taleinat', 'ned.deily', 'ezio.melotti', 'roger.serwy', 'markroseman', 'Todd.Rovito', 'python-dev', 'mcgrete', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue13884'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5', 'Python 3.6']

    Activity

    1. mcgrete commented on Jan 26, 2012

      mcgretemannequin
      MannequinAuthor

      When selecting from menu:
      File --> Recent Files
      the 'Recent Files' dropdown list undocks from the IDLE gui / File dropdown list. Even after selecting a past file, it remains open until closed manually.

      Ubuntu LUCID
      amd64
      IDLE 2.6.5
      TK version 8.5
      All installed using Ubuntu supported PPA (Synaptic)

      After closing 'Recent Files' subwindow, problem no longer persists until IDLE is terminated and restarted.

    2. ezio-melotti commented on Jan 26, 2012

      @ezio-melotti
      Member

      Could you try with IDLE 2.7/3.2?

    3. terryjreedy commented on Jan 27, 2012

      @terryjreedy
      Member

      IDLE has tear-off menus. From Help/IDLE Help:
      "Click on the dotted line at the top of a menu to "tear it off":
      a separate window containing the menu is created."
      This is a feature, not a bug.

      On 3.2.2, Win7, the Recent Files sub-menu cannot be torn off unless and until the File menu is torn off.

    4. serwy commented on Jan 28, 2012

      serwymannequin
      Mannequin

      Should tear-off menus still be a feature? This relates to the bpo-13504 meta-issue, in particular entry "4) ANNOYANCE: Get rid of the detachable menus feature.."

      Attached is patch against 3.3a0 to disable tear-off menus. (It also makes modifications to Mac-specific code, but I can't test it since I don't have a Mac.)

    5. changed the title [-]IDLE 2.6.5 Recent Files undocks[/-] [+]IDLE: Remove tear-off menu feature[/+] on Oct 18, 2012
    6. terryjreedy commented on Oct 18, 2012

      @terryjreedy
      Member

      I wonder if anyone uses this feature and would miss it if gone. Since it is a simple matter of passing 'tearoff=0/1' on menu creation, perhaps it should be a configuration feature.

    7. rovitotv commented on Oct 18, 2012

      rovitotvmannequin
      Mannequin

      Terry,
      I would not miss the feature at all this is very old school Unix like and most people find it confusing. At my job I tend to provide Python support to my co-workers and have had many questions about it. In addition I think bpo-13504 meta issue provides even more evidence that removing the tear off menus would be a good thing. Something to consider with IDLE is it is often the first thing a user sees when using Python and first impressions count in most circumstances. IDLE could be much improved and Roger Serwy has a good start on improvements with his IdleX project. Thanks for the review and I for one would appreciate this patch getting committed.

    8. serhiy-storchaka commented on Oct 18, 2012

      @serhiy-storchaka
      Member

      Yes, please, make it a configuration feature (off by default). Tear-off menus useful for large and deeply nested menus. Do not forget about people with disabilities.

    9. ned-deily commented on Oct 18, 2012

      @ned-deily
      Member

      Keep in mind that tear-off menus are not supported on IDLE on OS X when using Aqua Tk (either Carbon or Cocoa), the standard these days. That's primarily because Aqua Tk uses native OS X menu bars which appear once at the top of the desktop, not in each window. There are no dotted line menu bars there. The desktop menu bar menu items change to reflect which window currently has keyboard focus.

    10. ezio-melotti commented on Oct 31, 2014

      @ezio-melotti
      Member

      I haven't seen any other program using it, so I wouldn't mind if they were removed. People with disabilities probably have better ways to deal with menus, but if adding the option is trivial it's probably better to add it.

    11. roseman commented on Jul 29, 2015

      rosemanmannequin
      Mannequin

      As indicated in prior comments, the tearoff menus are strictly a holdover from ancient Motif, and are no longer found in current user interfaces on any platform. Because of that, I would strongly support deleting them altogether, rather than making available a configuration option.

      I've updated Roger's patch for current 3.x tip (and also extended it to remove the reference to tearoff menus from the help file).

    12. roseman commented on Jul 29, 2015

      rosemanmannequin
      Mannequin

      Same changes for 2.7 branch

    13. terryjreedy commented on Jul 30, 2015

      @terryjreedy
      Member

      In your online tutorial, your recommend
      root.option_add('*tearOff', FALSE)
      Why not here, and be covered everywhere, and in the future?
      Or is this needed for each Toplevel?

    14. taleinat commented on Jul 30, 2015

      @taleinat
      Contributor

      +1 for removal.

    15. roseman commented on Jul 30, 2015

      rosemanmannequin
      Mannequin

      Doing it via the option database vs. on each menu would be my preferred approach. The option database is global, not per toplevel, so would cover everything. Only 'downside' is the whole its-not-an-application-its-a-library thing, though in the highly unlikely case someone was actually using idlelib this way, I'd consider setting that option a public service.

      There's no harm doing it the other way (and I was being polite since the previous patch was done that way), but it does very marginally increase maintainability difficulties (remembering to keep the option and add it to any future menus).

      Either way - please let's just make this change! :-)

    16. python-dev commented on Jul 30, 2015

      python-devmannequin
      Mannequin

      New changeset bead9330438c by Terry Jan Reedy in branch '2.7':
      Issue bpo-13884: Idle: Remove tearoff lines from menus. Patch by Roger Serwy.
      https://hg.python.org/cpython/rev/bead9330438c

      New changeset 6eb4441ed14b by Terry Jan Reedy in branch '3.4':
      Issue bpo-13884: Idle: Remove tearoff lines from menus. Patch by Roger Serwy.
      https://hg.python.org/cpython/rev/6eb4441ed14b

    17. terryjreedy commented on Jul 30, 2015

      @terryjreedy
      Member

      I decided the accessibility argument does not apply because a) there is only one nested menu, Recent files b) that menu can be very wide and I intend to make it longer, making it a bad candidate for staying on the screen, and c) when torn off, it did not seem accessible from the keyboard.

      I decided to keep the patch as is, with tearoff disabled at the point of submenu creation. Setting the option on root is no easier when there are multiple Tk() calls. There may be more than one for normal Idle execution. There are many for testing, and we want the option set for tests.

    18. self-assigned this
      on Jul 30, 2015
    19. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions