summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-11-27 03:19:07 (GMT)
committerGuido van Rossum <guido@python.org>1998-11-27 03:19:07 (GMT)
commitb5eed0328f79019d57ced87fe95ca24c18792443 (patch)
treed1997b03ed1c3495bbfaca0d54cad76e3c07fe63 /Tools
parent6e0a4136936c242da266a8ff7614f4861cadcb74 (diff)
downloadcpython-b5eed0328f79019d57ced87fe95ca24c18792443.zip
cpython-b5eed0328f79019d57ced87fe95ca24c18792443.tar.gz
cpython-b5eed0328f79019d57ced87fe95ca24c18792443.tar.bz2
Support underlining of menu labels
Diffstat (limited to 'Tools')
-rw-r--r--Tools/idle/EditorWindow.py9
-rw-r--r--Tools/idle/FileList.py2
2 files changed, 6 insertions, 5 deletions
diff --git a/Tools/idle/EditorWindow.py b/Tools/idle/EditorWindow.py
index fc8a8f1..24b62dc 100644
--- a/Tools/idle/EditorWindow.py
+++ b/Tools/idle/EditorWindow.py
@@ -82,17 +82,18 @@ class EditorWindow:
self.saved_change_hook()
menu_specs = [
- ("file", "File"),
- ("edit", "Edit"),
- ("help", "Help"),
+ ("file", "_File"),
+ ("edit", "_Edit"),
+ ("help", "_Help"),
]
def createmenubar(self):
mbar = self.menubar
self.menudict = mdict = {}
for name, label in self.menu_specs:
+ underline, label = self.Bindings.prepstr(label)
mdict[name] = menu = Menu(mbar, name=name)
- mbar.add_cascade(label=label, menu=menu)
+ mbar.add_cascade(label=label, menu=menu, underline=underline)
self.Bindings.fill_menus(self.text, mdict)
def about_dialog(self, event=None):
diff --git a/Tools/idle/FileList.py b/Tools/idle/FileList.py
index 3895399..bebf7427 100644
--- a/Tools/idle/FileList.py
+++ b/Tools/idle/FileList.py
@@ -21,7 +21,7 @@ class MultiEditorWindow(EditorWindow):
# Override menu bar specs
menu_specs = EditorWindow.menu_specs[:]
- menu_specs.insert(len(menu_specs)-1, ("windows", "Windows"))
+ menu_specs.insert(len(menu_specs)-1, ("windows", "_Windows"))
def __init__(self, flist, filename, key):
self.flist = flist