summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-12-18 17:21:30 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2010-12-18 17:21:30 (GMT)
commit28b77ece829110379a4ea3d9e45246b69ed5df67 (patch)
tree8f652442cdf75f37678bbbe011767252986dccd0
parent9d254f70928644cb573b0321c912eaabd012bfc4 (diff)
downloadcpython-28b77ece829110379a4ea3d9e45246b69ed5df67.zip
cpython-28b77ece829110379a4ea3d9e45246b69ed5df67.tar.gz
cpython-28b77ece829110379a4ea3d9e45246b69ed5df67.tar.bz2
Merged revisions 87374 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87374 | r.david.murray | 2010-12-18 12:19:10 -0500 (Sat, 18 Dec 2010) | 8 lines #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. ........
-rw-r--r--Lib/idlelib/EditorWindow.py9
-rw-r--r--Misc/NEWS2
2 files changed, 10 insertions, 1 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index c1e9e1e..2cbf9c3 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -139,6 +139,14 @@ class EditorWindow(object):
if macosxSupport.runningAsOSXApp():
# 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>.)
+ 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("<<copy>>", self.copy)
text.bind("<<paste>>", self.paste)
@@ -157,7 +165,6 @@ class EditorWindow(object):
text.bind("<<find-selection>>", self.find_selection_event)
text.bind("<<replace>>", self.replace_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("<<newline-and-indent>>",self.newline_and_indent_event)
text.bind("<<smart-indent>>",self.smart_indent_event)
diff --git a/Misc/NEWS b/Misc/NEWS
index 2c78312..def99aa 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,8 @@ Core and Builtins
Library
-------
+- Issue #10404: Use ctl-button-1 on OSX for the context menu in Idle.
+
- Issue #4188: Avoid creating dummy thread objects when logging operations
from the threading module (with the internal verbose flag activated).