mirror of
https://github.com/python/cpython.git
synced 2025-09-09 10:21:43 +00:00
Issue #24570: Right-click for context menus now work on Mac Aqual also.
Patch by Mark Roseman.
This commit is contained in:
parent
8f278f1662
commit
3c7eccd0a6
2 changed files with 13 additions and 5 deletions
|
@ -175,13 +175,13 @@ class EditorWindow(object):
|
|||
if macosxSupport.isAquaTk():
|
||||
# Command-W on editorwindows doesn't work without this.
|
||||
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>.)
|
||||
# Some OS X systems have only one mouse button, so use
|
||||
# control-click for popup context menus there. For two
|
||||
# buttons, AquaTk defines <2> as the right button, not <3>.
|
||||
text.bind("<Control-Button-1>",self.right_menu_event)
|
||||
text.bind("<2>", self.right_menu_event)
|
||||
else:
|
||||
# Elsewhere, use right-click for pulldown menus.
|
||||
# Elsewhere, use right-click for popup menus.
|
||||
text.bind("<3>",self.right_menu_event)
|
||||
text.bind("<<cut>>", self.cut)
|
||||
text.bind("<<copy>>", self.copy)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue