From a73a964e51247ed169d322c725a3a18859f109a3 Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Mon, 14 Jun 2021 00:00:37 +0000 Subject: python, hg: tow outside the environment. they've served us well, and can ride off into the sunset. --- sys/lib/python/idlelib/Bindings.py | 111 ------------------------------------- 1 file changed, 111 deletions(-) delete mode 100644 sys/lib/python/idlelib/Bindings.py (limited to 'sys/lib/python/idlelib/Bindings.py') diff --git a/sys/lib/python/idlelib/Bindings.py b/sys/lib/python/idlelib/Bindings.py deleted file mode 100644 index a3c9fc45f..000000000 --- a/sys/lib/python/idlelib/Bindings.py +++ /dev/null @@ -1,111 +0,0 @@ -"""Define the menu contents, hotkeys, and event bindings. - -There is additional configuration information in the EditorWindow class (and -subclasses): the menus are created there based on the menu_specs (class) -variable, and menus not created are silently skipped in the code here. This -makes it possible, for example, to define a Debug menu which is only present in -the PythonShell window, and a Format menu which is only present in the Editor -windows. - -""" -import sys -from configHandler import idleConf - -menudefs = [ - # underscore prefixes character to underscore - ('file', [ - ('_New Window', '<>'), - ('_Open...', '<>'), - ('Open _Module...', '<>'), - ('Class _Browser', '<>'), - ('_Path Browser', '<>'), - None, - ('_Save', '<>'), - ('Save _As...', '<>'), - ('Save Cop_y As...', '<>'), - None, - ('Prin_t Window', '<>'), - None, - ('_Close', '<>'), - ('E_xit', '<>'), - ]), - ('edit', [ - ('_Undo', '<>'), - ('_Redo', '<>'), - None, - ('Cu_t', '<>'), - ('_Copy', '<>'), - ('_Paste', '<>'), - ('Select _All', '<>'), - None, - ('_Find...', '<>'), - ('Find A_gain', '<>'), - ('Find _Selection', '<>'), - ('Find in Files...', '<>'), - ('R_eplace...', '<>'), - ('Go to _Line', '<>'), - ]), -('format', [ - ('_Indent Region', '<>'), - ('_Dedent Region', '<>'), - ('Comment _Out Region', '<>'), - ('U_ncomment Region', '<>'), - ('Tabify Region', '<>'), - ('Untabify Region', '<>'), - ('Toggle Tabs', '<>'), - ('New Indent Width', '<>'), - ]), - ('run', [ - ('Python Shell', '<>'), - ]), - ('shell', [ - ('_View Last Restart', '<>'), - ('_Restart Shell', '<>'), - ]), - ('debug', [ - ('_Go to File/Line', '<>'), - ('!_Debugger', '<>'), - ('_Stack Viewer', '<>'), - ('!_Auto-open Stack Viewer', '<>'), - ]), - ('options', [ - ('_Configure IDLE...', '<>'), - None, - ]), - ('help', [ - ('_About IDLE', '<>'), - None, - ('_IDLE Help', '<>'), - ('Python _Docs', '<>'), - ]), -] - -import sys -if sys.platform == 'darwin' and '.app' in sys.executable: - # 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] - - menudefs.insert(0, - ('application', [ - ('About IDLE', '<>'), - None, - ('_Preferences....', '<>'), - ])) - - -default_keydefs = idleConf.GetCurrentKeySet() - -del sys -- cgit v1.2.3