1998-11-26 23:17:49 -04:00
|
|
|
# This file defines the menu contents and key bindings. Note that
|
|
|
|
# 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 by the code here. This makes it possible to define the
|
|
|
|
# Debug menu here, which is only present in the PythonShell window.
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import string
|
1999-01-02 17:28:54 -04:00
|
|
|
from keydefs import *
|
1998-11-26 23:17:49 -04:00
|
|
|
|
|
|
|
menudefs = [
|
|
|
|
# underscore prefixes character to underscore
|
|
|
|
('file', [
|
|
|
|
('_New window', '<<open-new-window>>'),
|
|
|
|
('_Open...', '<<open-window-from-file>>'),
|
|
|
|
('Open _module...', '<<open-module>>'),
|
1999-01-02 17:28:54 -04:00
|
|
|
('Class _browser', '<<open-class-browser>>'),
|
1999-03-10 01:18:02 -04:00
|
|
|
('_Path browser', '<<open-path-browser>>'),
|
1999-01-02 17:28:54 -04:00
|
|
|
('Python shell', '<<open-python-shell>>'),
|
1998-11-26 23:17:49 -04:00
|
|
|
None,
|
|
|
|
('_Save', '<<save-window>>'),
|
|
|
|
('Save _As...', '<<save-window-as-file>>'),
|
|
|
|
('Save Co_py As...', '<<save-copy-of-window-as-file>>'),
|
|
|
|
None,
|
|
|
|
('_Close', '<<close-window>>'),
|
|
|
|
('E_xit', '<<close-all-windows>>'),
|
|
|
|
]),
|
|
|
|
('edit', [
|
|
|
|
('_Undo', '<<undo>>'),
|
|
|
|
('_Redo', '<<redo>>'),
|
|
|
|
None,
|
|
|
|
('Cu_t', '<<Cut>>'),
|
|
|
|
('_Copy', '<<Copy>>'),
|
|
|
|
('_Paste', '<<Paste>>'),
|
1999-01-02 17:28:54 -04:00
|
|
|
('Select _All', '<<select-all>>'),
|
|
|
|
]),
|
1998-11-26 23:17:49 -04:00
|
|
|
('debug', [
|
1999-01-02 17:28:54 -04:00
|
|
|
('_Go to file/line', '<<goto-file-line>>'),
|
1999-01-28 18:02:47 -04:00
|
|
|
('_Stack viewer', '<<open-stack-viewer>>'),
|
|
|
|
('!_Debugger', '<<toggle-debugger>>'),
|
|
|
|
('!_Auto-open stack viewer', '<<toggle-jit-stack-viewer>>' ),
|
1998-11-26 23:17:49 -04:00
|
|
|
]),
|
|
|
|
('help', [
|
|
|
|
('_Help...', '<<help>>'),
|
|
|
|
None,
|
|
|
|
('_About IDLE...', '<<about-idle>>'),
|
|
|
|
]),
|
1998-10-10 15:48:31 -03:00
|
|
|
]
|
|
|
|
|
1998-11-26 23:17:49 -04:00
|
|
|
if sys.platform == 'win32':
|
|
|
|
default_keydefs = windows_keydefs
|
|
|
|
else:
|
1999-01-02 17:28:54 -04:00
|
|
|
default_keydefs = unix_keydefs
|