changeset: 97151:bead9330438c branch: 2.7 user: Terry Jan Reedy date: Thu Jul 30 16:44:09 2015 -0400 files: Doc/library/idle.rst Lib/idlelib/EditorWindow.py Lib/idlelib/help.txt Lib/idlelib/macosxSupport.py description: Issue #13884: Idle: Remove tearoff lines from menus. Patch by Roger Serwy. diff -r 296a09614f31 -r bead9330438c Doc/library/idle.rst --- a/Doc/library/idle.rst Thu Jul 30 23:27:13 2015 +0300 +++ b/Doc/library/idle.rst Thu Jul 30 16:44:09 2015 -0400 @@ -37,8 +37,6 @@ 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 -r 296a09614f31 -r bead9330438c Lib/idlelib/EditorWindow.py --- a/Lib/idlelib/EditorWindow.py Thu Jul 30 23:27:13 2015 +0300 +++ b/Lib/idlelib/EditorWindow.py Thu Jul 30 16:44:09 2015 -0400 @@ -316,7 +316,7 @@ 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 @@ 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 -r 296a09614f31 -r bead9330438c Lib/idlelib/help.txt --- a/Lib/idlelib/help.txt Thu Jul 30 23:27:13 2015 +0300 +++ b/Lib/idlelib/help.txt Thu Jul 30 16:44:09 2015 -0400 @@ -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 -r 296a09614f31 -r bead9330438c Lib/idlelib/macosxSupport.py --- a/Lib/idlelib/macosxSupport.py Thu Jul 30 23:27:13 2015 +0300 +++ b/Lib/idlelib/macosxSupport.py Thu Jul 30 16:44:09 2015 -0400 @@ -147,7 +147,7 @@ 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 @@ 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', [