Skip to content

Commit

Permalink
fix exception with menu.popup()
Browse files Browse the repository at this point in the history
  • Loading branch information
vantu5z committed Mar 1, 2018
1 parent a7dcb58 commit 3ee074f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions GraphView/graphview.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ def node_menu(self, node_class, handle, event):
menu_item.connect("activate", self.edit_person, handle)
menu.add(menu_item)

menu_item = Gtk.MenuItem(_('Add spouse'))
menu_item = Gtk.MenuItem(_('Add new partner'))
menu_item.connect("activate", self.add_spouse, handle)
menu.add(menu_item)

Expand All @@ -981,7 +981,10 @@ def node_menu(self, node_class, handle, event):
menu.add(menu_item)

menu.show_all()
menu.popup(None, None, None, None, event.button, event.time)
# new from gtk 3.22:
# menu.popup_at_pointer(event)
menu.popup(None, None, None, None,
event.get_button()[1], event.time)

elif node_class == 'familynode':
if handle:
Expand Down

0 comments on commit 3ee074f

Please sign in to comment.