]> granicus.if.org Git - python/commitdiff
Merged revisions 88232 via svnmerge from
authorNed Deily <nad@acm.org>
Mon, 31 Jan 2011 00:52:49 +0000 (00:52 +0000)
committerNed Deily <nad@acm.org>
Mon, 31 Jan 2011 00:52:49 +0000 (00:52 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88232 | ned.deily | 2011-01-29 10:29:01 -0800 (Sat, 29 Jan 2011) | 5 lines

  Issue #10940: Workaround an IDLE hang on Mac OS X 10.6 when using the
  menu accelerators for Open Module, Go to Line, and New Indent Width.
  The accelerators still work but no longer appear in the menu items.
........

Lib/idlelib/EditorWindow.py
Misc/NEWS

index def75904bdd79ab40e59216da7b7d52ebc916320..a487302b0964d347be78768a2e826ffdbe9db80a 100644 (file)
@@ -1541,7 +1541,12 @@ keynames = {
 
 def get_accelerator(keydefs, eventname):
     keylist = keydefs.get(eventname)
-    if not keylist:
+    # issue10940: temporary workaround to prevent hang with OS X Cocoa Tk 8.5
+    # if not keylist:
+    if (not keylist) or (macosxSupport.runningAsOSXApp() and eventname in {
+                            "<<open-module>>",
+                            "<<goto-line>>",
+                            "<<change-indentwidth>>"}):
         return ""
     s = keylist[0]
     s = re.sub(r"-[a-z]\b", lambda m: m.group().upper(), s)
index c78bfbb4d940562f04862c27f0350cee95227007..79c67c7f1d62d3e76a9032a087d6b51cb4da4b41 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,10 @@ Core and Builtins
 Library
 -------
 
+- Issue #10940: Workaround an IDLE hang on Mac OS X 10.6 when using the
+  menu accelerators for Open Module, Go to Line, and New Indent Width.
+  The accelerators still work but no longer appear in the menu items.
+
 - Issue #10907: Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5, rather
   than the currently problematic Apple-supplied one, when running with the
   64-/32-bit installer variant.