Skip to content

Commit 0c38939

Browse files
committed
Issue #13884: Idle: Remove tearoff lines from menus. Patch by Roger Serwy.
1 parent fae0fe4 commit 0c38939

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

Doc/library/idle.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ context menu.
3737

3838
IDLE's menus dynamically change based on which window is currently selected.
3939
Each menu documented below indicates which window type it is associated with.
40-
Click on the dotted line at the top of a menu to "tear it off": a separate
41-
window containing the menu is created (for Unix and Windows only).
4240

4341
File menu (Shell and Editor)
4442
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Lib/idlelib/EditorWindow.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
316316
io.set_filename_change_hook(self.filename_change_hook)
317317

318318
# Create the recent files submenu
319-
self.recent_files_menu = Menu(self.menubar)
319+
self.recent_files_menu = Menu(self.menubar, tearoff=0)
320320
self.menudict['file'].insert_cascade(3, label='Recent Files',
321321
underline=0,
322322
menu=self.recent_files_menu)
@@ -477,12 +477,13 @@ def createmenubar(self):
477477
self.menudict = menudict = {}
478478
for name, label in self.menu_specs:
479479
underline, label = prepstr(label)
480-
menudict[name] = menu = Menu(mbar, name=name)
480+
menudict[name] = menu = Menu(mbar, name=name, tearoff=0)
481481
mbar.add_cascade(label=label, menu=menu, underline=underline)
482482

483483
if macosxSupport.isCarbonTk():
484484
# Insert the application menu
485-
menudict['application'] = menu = Menu(mbar, name='apple')
485+
menudict['application'] = menu = Menu(mbar, name='apple',
486+
tearoff=0)
486487
mbar.add_cascade(label='IDLE', menu=menu)
487488

488489
self.fill_menus()

Lib/idlelib/help.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
[See the end of this file for ** TIPS ** on using IDLE !!]
22

3-
Click on the dotted line at the top of a menu to "tear it off": a
4-
separate window containing the menu is created.
5-
63
File Menu:
74

85
New File -- Create a new editing window

Lib/idlelib/macosxSupport.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def overrideRootMenu(root, flist):
147147
root.configure(menu=menubar)
148148
menudict = {}
149149

150-
menudict['windows'] = menu = Menu(menubar, name='windows')
150+
menudict['windows'] = menu = Menu(menubar, name='windows', tearoff=0)
151151
menubar.add_cascade(label='Window', menu=menu, underline=0)
152152

153153
def postwindowsmenu(menu=menu):
@@ -187,7 +187,8 @@ def help_dialog(event=None):
187187

188188
if isCarbonTk():
189189
# for Carbon AquaTk, replace the default Tk apple menu
190-
menudict['application'] = menu = Menu(menubar, name='apple')
190+
menudict['application'] = menu = Menu(menubar, name='apple',
191+
tearoff=0)
191192
menubar.add_cascade(label='IDLE', menu=menu)
192193
Bindings.menudefs.insert(0,
193194
('application', [

0 commit comments

Comments
 (0)