def pop_mymenu(self, widget, event, menu): if right_click_pressed(event): menu.popup(None, None, None, event.button, event.time)
def box_pressed(self, widget, event=None): if right_click_pressed(event): self.menu.popup(None, None, None, event.button, event.time)