Accept control-click as an alternative for right-click when the Gdk

backend is Quartz.


This is a standard behavior on Macs, since they often have single-button 
mice or trackpads.



svn: r19752
This commit is contained in:
John Ralls
2012-06-04 00:47:19 +00:00
parent bb38c5c0ee
commit 0cc0915c03
16 changed files with 72 additions and 39 deletions

View File

@@ -56,6 +56,7 @@ from gui.plug import tool
import ManagedWindow
from QuestionDialog import InfoDialog
from glade import Glade
import gui.utils
#-------------------------------------------------------------------------
#
@@ -116,7 +117,7 @@ class Leak(tool.Tool, ManagedWindow.ManagedWindow):
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
self.referenced_in()
return True
elif event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
elif gui.utils.is_right_click(event):
self.refers_to()
return True

View File

@@ -46,6 +46,7 @@ import ManagedWindow
from gui.plug import tool
from gen.ggettext import sgettext as _
from glade import Glade
import gui.utils
#-------------------------------------------------------------------------
#
@@ -154,7 +155,7 @@ class OwnerEditor(tool.Tool, ManagedWindow.ManagedWindow):
def on_button_press_event(self, obj, event):
"""Shows popup-menu for db <-> preferences copying"""
if event.button == 3 and event.type == gtk.gdk.BUTTON_PRESS:
if gui.utils.is_right_click(event):
self.menu.popup(None,None,None,0,0)
def build_menu_names(self, obj):