This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年04月08日 00:14 by Todd.Rovito, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue17654.patch | ned.deily, 2014年02月10日 10:32 | review | ||
| Messages (9) | |||
|---|---|---|---|
| msg186257 - (view) | Author: Todd Rovito (Todd.Rovito) * | Date: 2013年04月08日 00:14 | |
IDLE's new right click menu doesn't seem to be working on Mac OS X. I am running OS X 10.8.3 with TK version 8.5.9 (which I think is what OS X 10.8.3 ships with). The right click activation I am trying is control-click. |
|||
| msg186258 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2013年04月08日 00:51 | |
It works OK as long as you are running Python from a framework build (--enable-framework). There are various OS X customizations in IDLE that are currently triggered by the runningAsOSXApp() function in idlelib/macosxSupport.py. One of the customizations is to add the event binding for <Control-Button-1> (in idle lib/EditorWindow.py). Restricting the customizations to framework builds is not useful nor correct and there are some other questionable customizations assumptions made in that module. I'll work up a patch. In the meantime, you can easily workaround it for testing by patching runningAsOSXApp to always return True. |
|||
| msg186500 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2013年04月10日 14:51 | |
The trigger for the customizations is probably too specific. The primary reason for a having a check that's more specific than 'if sys.platform == "darwin"' is to avoid using the customizations when someone uses an X11 build of Tk and I didn't know (and still don't) a way to check for a "native" Tk port. |
|||
| msg210820 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2014年02月10日 10:32 | |
Here's a patch that refactors many of the OS X customizations in IDLE based on more granular criteria, e.g. those that should apply to all Tk implementations vs those that depend on specific ones (Cocoa Tk, Carbon Tk, or X11 Tk) rather than the bogus current framework test. This should fix the specific problem of the control-click menu not appearing in non-framework builds along with various other issues such as missing menu items when using an X11 Tk on OS X. It does not address the issue of providing the OS X specific key set with a non-framework build: Issue20580 addresses that. |
|||
| msg210823 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2014年02月10日 10:52 | |
(Just to be clear, the Tk situation on OS X has changed substantially since the original customizations were added by Ronald. So the checks weren't bogus initially. And I've modified some of them subsequently before understanding some of the "nuances" of the various Tk implementations.) |
|||
| msg215007 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2014年03月27日 23:58 | |
If there are no objections, I'd like to commit this cleanup soon. It should make things a bit easier for people testing IDLE from development builds on OS X and fix some long-standing bugs when linking with the Tk X11 variant on OS X. |
|||
| msg215010 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2014年03月28日 00:39 | |
If I understand the Bindings.py patch, the fragility changed from "If you edit menudefs, edit the Mac block that follows" to "If you change (e sections of) menudefs, edit macosxSupport.overrideRootMenu". That seems like a wash to me, except for the narrowing down of which sections might later be patched. Every thing else that is not a change to macosSupport is guarded by macosSupport.xxx or 'darwin', so none from me. |
|||
| msg215016 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年03月28日 03:52 | |
New changeset f551740c26b6 by Ned Deily in branch '2.7': Issue #17654: Ensure IDLE menus are customized properly on OS X for http://hg.python.org/cpython/rev/f551740c26b6 New changeset 67a7a49e7b78 by Ned Deily in branch '3.4': Issue #17654: Ensure IDLE menus are customized properly on OS X for http://hg.python.org/cpython/rev/67a7a49e7b78 New changeset d8659dbebfd1 by Ned Deily in branch 'default': Issue #17654: merge from 3.4 http://hg.python.org/cpython/rev/d8659dbebfd1 |
|||
| msg215017 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2014年03月28日 04:07 | |
Thanks for the review, Terry. The reasons for moving the menders changes are two. As noted in the comments, the menudefs were being customized early in IDLE initialization before calling Tk to create the root object and, therefore, we did not know at that point which kind of Tk we were running under. To properly customize, we need to know that, as we are now more careful to customize menus depending on the OS X Tk variant. Also, there already were other menu customizations being done in macosxSupport; now it is all in one place. It would be nice to reduce the fragility in the menu management. I would encourage anyone interested in working on IDLE to tackle it as a separate issue. Applied for release in 3.5.0, 3.4.1, and 2.7.7. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:43 | admin | set | github: 61854 |
| 2014年03月28日 04:07:20 | ned.deily | set | status: open -> closed resolution: fixed messages: + msg215017 stage: commit review -> resolved |
| 2014年03月28日 03:52:03 | python-dev | set | nosy:
+ python-dev messages: + msg215016 |
| 2014年03月28日 00:39:37 | terry.reedy | set | messages: + msg215010 |
| 2014年03月27日 23:58:17 | ned.deily | set | versions:
+ Python 3.5, - Python 3.3 nosy: + terry.reedy messages: + msg215007 stage: patch review -> commit review |
| 2014年02月10日 10:52:53 | ned.deily | set | messages: + msg210823 |
| 2014年02月10日 10:32:11 | ned.deily | set | files:
+ issue17654.patch keywords: + patch messages: + msg210820 stage: needs patch -> patch review |
| 2013年04月10日 14:51:15 | ronaldoussoren | set | nosy:
+ ronaldoussoren messages: + msg186500 |
| 2013年04月08日 00:54:28 | ned.deily | set | assignee: ned.deily stage: needs patch title: IDLE: Right click menu not working on OS X -> IDLE only customizes correctly for OS X when using framework build versions: + Python 3.3 |
| 2013年04月08日 00:51:46 | ned.deily | set | messages: + msg186258 |
| 2013年04月08日 00:14:56 | Todd.Rovito | create | |