def _button_press(self, obj, event): if event.type == Gdk.EventType._2BUTTON_PRESS and event.button == 1: self.referenced_in() return True elif is_right_click(event): self.refers_to() return True
def __button_press(self, obj, event): """ Called when a button press is executed """ from gramps.gui.utils import is_right_click if event.type == Gdk.EventType._2BUTTON_PRESS and event.button == 1: if self.double_click: self.double_click(obj) return True elif is_right_click(event): if self.right_click: self.right_click(obj, event) return True return False
def on_button_press_event(self, obj, event): """Shows popup-menu for db <-> preferences copying""" if is_right_click(event): self.menu.popup(None, None, None, None, 0, 0)