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: Remove tear-off menu feature #58092
Comments
When selecting from menu: Ubuntu LUCID After closing 'Recent Files' subwindow, problem no longer persists until IDLE is terminated and restarted. |
Could you try with IDLE 2.7/3.2? |
IDLE has tear-off menus. From Help/IDLE Help: On 3.2.2, Win7, the Recent Files sub-menu cannot be torn off unless and until the File menu is torn off. |
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.) |
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. |
Terry, |
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. |
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. |
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. |
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). |
Same changes for 2.7 branch |
In your online tutorial, your recommend |
+1 for removal. |
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! :-) |
New changeset bead9330438c by Terry Jan Reedy in branch '2.7': New changeset 6eb4441ed14b by Terry Jan Reedy in branch '3.4': |
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. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: