diff options
| author | Ned Deily <nad@acm.org> | 2014-03-28 03:51:15 (GMT) |
|---|---|---|
| committer | Ned Deily <nad@acm.org> | 2014-03-28 03:51:15 (GMT) |
| commit | c318288f69e11c537baeca6799c212e8dd294b85 (patch) | |
| tree | 61db5fc96166290d16cfb529945086cadd935ac7 /Lib/idlelib/Bindings.py | |
| parent | 090eb1fd18f7cdd753b6fc9b60162491ee48f04e (diff) | |
| parent | b7601676b07c7c8e79af9e7818a783b966612c34 (diff) | |
| download | cpython-c318288f69e11c537baeca6799c212e8dd294b85.zip cpython-c318288f69e11c537baeca6799c212e8dd294b85.tar.gz cpython-c318288f69e11c537baeca6799c212e8dd294b85.tar.bz2 | |
Issue #17654: merge from 3.4
Diffstat (limited to 'Lib/idlelib/Bindings.py')
| -rw-r--r-- | Lib/idlelib/Bindings.py | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/Lib/idlelib/Bindings.py b/Lib/idlelib/Bindings.py index 65c0317..df2b251 100644 --- a/Lib/idlelib/Bindings.py +++ b/Lib/idlelib/Bindings.py @@ -8,9 +8,14 @@ the PythonShell window, and a Format menu which is only present in the Editor windows. """ -import sys from idlelib.configHandler import idleConf -from idlelib import macosxSupport + +# Warning: menudefs is altered in macosxSupport.overrideRootMenu() +# after it is determined that an OS X Aqua Tk is in use, +# which cannot be done until after Tk() is first called. +# Do not alter the 'file', 'options', or 'help' cascades here +# without altering overrideRootMenu() as well. +# TODO: Make this more robust menudefs = [ # underscore prefixes character to underscore @@ -81,27 +86,4 @@ menudefs = [ ]), ] -if macosxSupport.runningAsOSXApp(): - # Running as a proper MacOS application bundle. This block restructures - # the menus a little to make them conform better to the HIG. - - quitItem = menudefs[0][1][-1] - closeItem = menudefs[0][1][-2] - - # Remove the last 3 items of the file menu: a separator, close window and - # quit. Close window will be reinserted just above the save item, where - # it should be according to the HIG. Quit is in the application menu. - del menudefs[0][1][-3:] - menudefs[0][1].insert(6, closeItem) - - # Remove the 'About' entry from the help menu, it is in the application - # menu - del menudefs[-1][1][0:2] - - # Remove the 'Configure' entry from the options menu, it is in the - # application menu as 'Preferences' - del menudefs[-2][1][0:2] - default_keydefs = idleConf.GetCurrentKeySet() - -del sys |
