summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-07-30 20:44:09 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2015-07-30 20:44:09 (GMT)
commitfa002d4cdd3a44a07252857ec7a55ed27fb15648 (patch)
treec7353850fa05192a918f2347b26c5998b301153f
parentffc7e8eebe8cd9f3391ff856be398f8d9ead6587 (diff)
downloadcpython-fa002d4cdd3a44a07252857ec7a55ed27fb15648.zip
cpython-fa002d4cdd3a44a07252857ec7a55ed27fb15648.tar.gz
cpython-fa002d4cdd3a44a07252857ec7a55ed27fb15648.tar.bz2
Issue #13884: Idle: Remove tearoff lines from menus. Patch by Roger Serwy.
-rw-r--r--Doc/library/idle.rst2
-rw-r--r--Lib/idlelib/EditorWindow.py7
-rw-r--r--Lib/idlelib/help.txt3
-rw-r--r--Lib/idlelib/macosxSupport.py5
4 files changed, 7 insertions, 10 deletions
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index 24e22c1..e64f683 100644
--- 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)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 0a95293..7b68140 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -316,7 +316,7 @@ class EditorWindow(object):
io.set_filename_change_hook(self.filename_change_hook)
# Create the recent files submenu
- self.recent_files_menu = Menu(self.menubar)
+ self.recent_files_menu = Menu(self.menubar, tearoff=0)
self.menudict['file'].insert_cascade(3, label='Recent Files',
underline=0,
menu=self.recent_files_menu)
@@ -477,12 +477,13 @@ class EditorWindow(object):
self.menudict = menudict = {}
for name, label in self.menu_specs:
underline, label = prepstr(label)
- menudict[name] = menu = Menu(mbar, name=name)
+ menudict[name] = menu = Menu(mbar, name=name, tearoff=0)
mbar.add_cascade(label=label, menu=menu, underline=underline)
if macosxSupport.isCarbonTk():
# Insert the application menu
- menudict['application'] = menu = Menu(mbar, name='apple')
+ menudict['application'] = menu = Menu(mbar, name='apple',
+ tearoff=0)
mbar.add_cascade(label='IDLE', menu=menu)
self.fill_menus()
diff --git a/Lib/idlelib/help.txt b/Lib/idlelib/help.txt
index c4d7155..eed89c0 100644
--- a/Lib/idlelib/help.txt
+++ b/Lib/idlelib/help.txt
@@ -1,8 +1,5 @@
[See the end of this file for ** TIPS ** on using IDLE !!]
-Click on the dotted line at the top of a menu to "tear it off": a
-separate window containing the menu is created.
-
File Menu:
New File -- Create a new editing window
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
index 60f5cc4..70ee8fb 100644
--- a/Lib/idlelib/macosxSupport.py
+++ b/Lib/idlelib/macosxSupport.py
@@ -147,7 +147,7 @@ def overrideRootMenu(root, flist):
root.configure(menu=menubar)
menudict = {}
- menudict['windows'] = menu = Menu(menubar, name='windows')
+ menudict['windows'] = menu = Menu(menubar, name='windows', tearoff=0)
menubar.add_cascade(label='Window', menu=menu, underline=0)
def postwindowsmenu(menu=menu):
@@ -187,7 +187,8 @@ def overrideRootMenu(root, flist):
if isCarbonTk():
# for Carbon AquaTk, replace the default Tk apple menu
- menudict['application'] = menu = Menu(menubar, name='apple')
+ menudict['application'] = menu = Menu(menubar, name='apple',
+ tearoff=0)
menubar.add_cascade(label='IDLE', menu=menu)
Bindings.menudefs.insert(0,
('application', [