]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #10940: Workaround an IDLE hang on Mac OS X 10.6 when using the
authorNed Deily <nad@acm.org>
Sat, 29 Jan 2011 18:29:01 +0000 (18:29 +0000)
committerNed Deily <nad@acm.org>
Sat, 29 Jan 2011 18:29:01 +0000 (18:29 +0000)
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 938a656244ff0ce6ce1cacac159eaaae1d8e122f..6a1e325880c8d06abf9d3405fa4ffc75fa94de3b 100644 (file)
@@ -1546,7 +1546,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 51f5ac151b792d3e86d89d66501ccb41a5eee673..68445aba7b64fe6255d93b86cf192b39dd79e10c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -16,6 +16,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 #10989: Fix a crash on SSLContext.load_verify_locations(None, True).
 
 - Issue #11020: Command-line pyclbr was broken because of missing 2-to-3