mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	#10404: Use ctl-button-1 for context menus on OSX Idle.
This provides access to the context menus where they previously could not be accessed due to the way OSX Tk binds buttons. It also improves platform consistency. Patch by Ned Deily.
This commit is contained in:
		
							parent
							
								
									5466bf1c94
								
							
						
					
					
						commit
						b68a7bc70c
					
				
					 2 changed files with 11 additions and 2 deletions
				
			
		|  | @ -138,6 +138,14 @@ def __init__(self, flist=None, filename=None, key=None, root=None): | ||||||
|         if macosxSupport.runningAsOSXApp(): |         if macosxSupport.runningAsOSXApp(): | ||||||
|             # Command-W on editorwindows doesn't work without this. |             # Command-W on editorwindows doesn't work without this. | ||||||
|             text.bind('<<close-window>>', self.close_event) |             text.bind('<<close-window>>', self.close_event) | ||||||
|  |             # Some OS X systems have only one mouse button, | ||||||
|  |             # so use control-click for pulldown menus there. | ||||||
|  |             #  (Note, AquaTk defines <2> as the right button if | ||||||
|  |             #   present and the Tk Text widget already binds <2>.) | ||||||
|  |             text.bind("<Control-Button-1>",self.right_menu_event) | ||||||
|  |         else: | ||||||
|  |             # Elsewhere, use right-click for pulldown menus. | ||||||
|  |             text.bind("<3>",self.right_menu_event) | ||||||
|         text.bind("<<cut>>", self.cut) |         text.bind("<<cut>>", self.cut) | ||||||
|         text.bind("<<copy>>", self.copy) |         text.bind("<<copy>>", self.copy) | ||||||
|         text.bind("<<paste>>", self.paste) |         text.bind("<<paste>>", self.paste) | ||||||
|  | @ -156,7 +164,6 @@ def __init__(self, flist=None, filename=None, key=None, root=None): | ||||||
|         text.bind("<<find-selection>>", self.find_selection_event) |         text.bind("<<find-selection>>", self.find_selection_event) | ||||||
|         text.bind("<<replace>>", self.replace_event) |         text.bind("<<replace>>", self.replace_event) | ||||||
|         text.bind("<<goto-line>>", self.goto_line_event) |         text.bind("<<goto-line>>", self.goto_line_event) | ||||||
|         text.bind("<3>", self.right_menu_event) |  | ||||||
|         text.bind("<<smart-backspace>>",self.smart_backspace_event) |         text.bind("<<smart-backspace>>",self.smart_backspace_event) | ||||||
|         text.bind("<<newline-and-indent>>",self.newline_and_indent_event) |         text.bind("<<newline-and-indent>>",self.newline_and_indent_event) | ||||||
|         text.bind("<<smart-indent>>",self.smart_indent_event) |         text.bind("<<smart-indent>>",self.smart_indent_event) | ||||||
|  |  | ||||||
|  | @ -23,7 +23,9 @@ Core and Builtins | ||||||
| Library | Library | ||||||
| ------- | ------- | ||||||
| 
 | 
 | ||||||
| - Issue $9907: Fix tab handling on OSX when using editline by calling | - Issue #10404: Use ctl-button-1 on OSX for the context menu in Idle. | ||||||
|  | 
 | ||||||
|  | - Issue #9907: Fix tab handling on OSX when using editline by calling | ||||||
|   rl_initialize first, then setting our custom defaults, then reading .editrc. |   rl_initialize first, then setting our custom defaults, then reading .editrc. | ||||||
| 
 | 
 | ||||||
| - Issue #4188: Avoid creating dummy thread objects when logging operations | - Issue #4188: Avoid creating dummy thread objects when logging operations | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 R. David Murray
						R. David Murray