0001 """Define the menu contents, hotkeys, and event bindings. 0002 0003 There is additional configuration information in the EditorWindow class (and 0004 subclasses): the menus are created there based on the menu_specs (class) 0005 variable, and menus not created are silently skipped in the code here. This 0006 makes it possible, for example, to define a Debug menu which is only present in 0007 the PythonShell window, and a Format menu which is only present in the Editor 0008 windows. 0009 0010 """ 0011 import sys 0012 from configHandler import idleConf 0013 0014 menudefs = [ 0015 # underscore prefixes character to underscore 0016 ('file', [ 0017 ('_New Window', '<<open-new-window>>'), 0018 ('_Open...', '<<open-window-from-file>>'), 0019 ('Open _Module...', '<<open-module>>'), 0020 ('Class _Browser', '<<open-class-browser>>'), 0021 ('_Path Browser', '<<open-path-browser>>'), 0022 None, 0023 ('_Save', '<<save-window>>'), 0024 ('Save _As...', '<<save-window-as-file>>'), 0025 ('Save Co_py As...', '<<save-copy-of-window-as-file>>'), 0026 None, 0027 ('_Print Window', '<<print-window>>'), 0028 None, 0029 ('_Close', '<<close-window>>'), 0030 ('E_xit', '<<close-all-windows>>'), 0031 ]), 0032 ('edit', [ 0033 ('_Undo', '<<undo>>'), 0034 ('_Redo', '<<redo>>'), 0035 None, 0036 ('Cu_t', '<<cut>>'), 0037 ('_Copy', '<<copy>>'), 0038 ('_Paste', '<<paste>>'), 0039 ('Select _All', '<<select-all>>'), 0040 None, 0041 ('_Find...', '<<find>>'), 0042 ('Find A_gain', '<<find-again>>'), 0043 ('Find _Selection', '<<find-selection>>'), 0044 ('Find in Files...', '<<find-in-files>>'), 0045 ('R_eplace...', '<<replace>>'), 0046 ('Go to _Line', '<<goto-line>>'), 0047 ]), 0048 ('format', [ 0049 ('_Indent Region', '<<indent-region>>'), 0050 ('_Dedent Region', '<<dedent-region>>'), 0051 ('Comment _Out Region', '<<comment-region>>'), 0052 ('U_ncomment Region', '<<uncomment-region>>'), 0053 ('Tabify Region', '<<tabify-region>>'), 0054 ('Untabify Region', '<<untabify-region>>'), 0055 ('Toggle Tabs', '<<toggle-tabs>>'), 0056 ('New Indent Width', '<<change-indentwidth>>'), 0057 ]), 0058 ('run', [ 0059 ('Python Shell', '<<open-python-shell>>'), 0060 ]), 0061 ('shell', [ 0062 ('_View Last Restart', '<<view-restart>>'), 0063 ('_Restart Shell', '<<restart-shell>>'), 0064 ]), 0065 ('debug', [ 0066 ('_Go to File/Line', '<<goto-file-line>>'), 0067 ('!_Debugger', '<<toggle-debugger>>'), 0068 ('_Stack Viewer', '<<open-stack-viewer>>'), 0069 ('!_Auto-open Stack Viewer', '<<toggle-jit-stack-viewer>>'), 0070 ]), 0071 ('options', [ 0072 ('_Configure IDLE...', '<<open-config-dialog>>'), 0073 None, 0074 ]), 0075 ('help', [ 0076 ('_About IDLE', '<<about-idle>>'), 0077 None, 0078 ('_IDLE Help', '<<help>>'), 0079 ('Python _Docs', '<<python-docs>>'), 0080 ]), 0081 ] 0082 0083 default_keydefs = idleConf.GetCurrentKeySet() 0084 0085 del sys 0086
Generated by PyXR 0.9.4