]> granicus.if.org Git - python/commitdiff
Issue #24988: Idle ScrolledList context menus (used in debugger)
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 26 Sep 2015 22:50:26 +0000 (18:50 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sat, 26 Sep 2015 22:50:26 +0000 (18:50 -0400)
now work on Mac Aqua.  Patch by Mark Roseman.

Lib/idlelib/ScrolledList.py

index 71ec5470b4a5f07ff04c0dbe377e56f0c2e8a284..53576b5f82eb489f312ac9875150bea6cfa1753b 100644 (file)
@@ -1,4 +1,5 @@
 from tkinter import *
+from idlelib import macosxSupport
 
 class ScrolledList:
 
@@ -22,7 +23,11 @@ class ScrolledList:
         # Bind events to the list box
         listbox.bind("<ButtonRelease-1>", self.click_event)
         listbox.bind("<Double-ButtonRelease-1>", self.double_click_event)
-        listbox.bind("<ButtonPress-3>", self.popup_event)
+        if macosxSupport.isAquaTk():
+            listbox.bind("<ButtonPress-2>", self.popup_event)
+            listbox.bind("<Control-Button-1>", self.popup_event)
+        else:
+            listbox.bind("<ButtonPress-3>", self.popup_event)
         listbox.bind("<Key-Up>", self.up_event)
         listbox.bind("<Key-Down>", self.down_event)
         # Mark as empty