cpython: 6eb4441ed14b (original) (raw)
Mercurial > cpython
changeset 97152:6eb4441ed14b 3.4
Issue #13884: Idle: Remove tearoff lines from menus. Patch by Roger Serwy. [#13884]
Terry Jan Reedy tjreedy@udel.edu | |
---|---|
date | Thu, 30 Jul 2015 16:44:22 -0400 |
parents | f9694502f07c |
children | 3dd296430cc7 fe55a36a335b |
files | Doc/library/idle.rst Lib/idlelib/EditorWindow.py Lib/idlelib/help.txt Lib/idlelib/macosxSupport.py |
diffstat | 4 files changed, 8 insertions(+), 10 deletions(-)[+] [-] Doc/library/idle.rst 2 Lib/idlelib/EditorWindow.py 7 Lib/idlelib/help.txt 4 Lib/idlelib/macosxSupport.py 5 |
line wrap: on
line diff
--- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -37,8 +37,6 @@ context menu. IDLE's menus dynamically change based on which window is currently selected. Each menu documented below indicates which window type it is associated with. -Click on the dotted line at the top of a menu to "tear it off": a separate -window containing the menu is created (for Unix and Windows only). File menu (Shell and Editor) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -447,14 +447,15 @@ class EditorWindow(object): self.menudict = menudict = {} for name, label in self.menu_specs: underline, label = prepstr(label)
menudict[name] = menu = Menu(mbar, name=name)[](#l2.7)
menudict[name] = menu = Menu(mbar, name=name, tearoff=0)[](#l2.8) mbar.add_cascade(label=label, menu=menu, underline=underline)[](#l2.9) if macosxSupport.isCarbonTk():[](#l2.10) # Insert the application menu[](#l2.11)
menudict['application'] = menu = Menu(mbar, name='apple')[](#l2.12)
menudict['application'] = menu = Menu(mbar, name='apple',[](#l2.13)
tearoff=0)[](#l2.14) mbar.add_cascade(label='IDLE', menu=menu)[](#l2.15) self.fill_menus()[](#l2.16)
self.recent_files_menu = Menu(self.menubar)[](#l2.17)
self.recent_files_menu = Menu(self.menubar, tearoff=0)[](#l2.18) self.menudict['file'].insert_cascade(3, label='Recent Files',[](#l2.19) underline=0,[](#l2.20) menu=self.recent_files_menu)[](#l2.21)
--- a/Lib/idlelib/help.txt +++ b/Lib/idlelib/help.txt @@ -15,9 +15,7 @@ Menus: IDLE has two window types the Shell window and the Editor window. It is possible to have multiple editor windows simultaneously. IDLE's menus dynamically change based on which window is currently selected. Each menu -documented below indicates which window type it is associated with. Click on -the dotted line at the top of a menu to "tear it off": a separate window -containing the menu is created (for Unix and Windows only). +documented below indicates which window type it is associated with. File Menu (Shell and Editor):
--- a/Lib/idlelib/macosxSupport.py +++ b/Lib/idlelib/macosxSupport.py @@ -145,7 +145,7 @@ def overrideRootMenu(root, flist): root.configure(menu=menubar) menudict = {}
- menudict['windows'] = menu = Menu(menubar, name='windows', tearoff=0) menubar.add_cascade(label='Window', menu=menu, underline=0) def postwindowsmenu(menu=menu): @@ -191,7 +191,8 @@ def overrideRootMenu(root, flist): if isCarbonTk(): # for Carbon AquaTk, replace the default Tk apple menu
menudict['application'] = menu = Menu(menubar, name='apple')[](#l4.16)
menudict['application'] = menu = Menu(menubar, name='apple',[](#l4.17)
tearoff=0)[](#l4.18) menubar.add_cascade(label='IDLE', menu=menu)[](#l4.19) Bindings.menudefs.insert(0,[](#l4.20) ('application', [[](#l4.21)