From bd142c07449d5866763cc410ad97c186a85846c3 Mon Sep 17 00:00:00 2001 From: prculley Date: Mon, 14 Nov 2016 08:46:38 -0600 Subject: [PATCH] bug 9787; fix right-click menus crash caused by PR268 --- gramps/gui/editors/displaytabs/eventembedlist.py | 4 ++-- gramps/gui/editors/displaytabs/nameembedlist.py | 12 ++++++------ gramps/gui/editors/displaytabs/webembedlist.py | 8 ++++---- gramps/gui/editors/editfamily.py | 12 +++++------- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/gramps/gui/editors/displaytabs/eventembedlist.py b/gramps/gui/editors/displaytabs/eventembedlist.py index f36bcfd2c..30e7bcb62 100644 --- a/gramps/gui/editors/displaytabs/eventembedlist.py +++ b/gramps/gui/editors/displaytabs/eventembedlist.py @@ -311,8 +311,8 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList): return GroupEmbeddedList.get_popup_menu_items(self) else: return [ - (True, _('_Add'), 'list-add', self.add_button_clicked), - (False, _('_Edit'), 'gtk-edit', self.edit_button_clicked), + (True, _('_Add'), self.add_button_clicked), + (False, _('_Edit'), self.edit_button_clicked), ] def _non_native_change(self): diff --git a/gramps/gui/editors/displaytabs/nameembedlist.py b/gramps/gui/editors/displaytabs/nameembedlist.py index bc6947520..67ecda7e0 100644 --- a/gramps/gui/editors/displaytabs/nameembedlist.py +++ b/gramps/gui/editors/displaytabs/nameembedlist.py @@ -119,15 +119,15 @@ class NameEmbedList(GroupEmbeddedList): def get_popup_menu_items(self): if self._tmpgroup == self._WORKGROUP: return [ - (True, _('_Add'), 'list-add', self.add_button_clicked), - (False, _('_Edit'), 'gtk-edit', self.edit_button_clicked), - (True, _('_Remove'), 'list-remove', self.del_button_clicked), - (True, _('Set as default name'), None, self.name_button_clicked), + (True, _('_Add'), self.add_button_clicked), + (False, _('_Edit'), self.edit_button_clicked), + (True, _('_Remove'), self.del_button_clicked), + (True, _('Set as default name'), self.name_button_clicked), ] else: return [ - (True, _('_Add'), 'list-add', self.add_button_clicked), - (False,_('_Edit'), 'gtk-edit', self.edit_button_clicked), + (True, _('_Add'), self.add_button_clicked), + (False,_('_Edit'), self.edit_button_clicked), ] def name_button_clicked(self, obj): diff --git a/gramps/gui/editors/displaytabs/webembedlist.py b/gramps/gui/editors/displaytabs/webembedlist.py index 8b8703603..1c4208feb 100644 --- a/gramps/gui/editors/displaytabs/webembedlist.py +++ b/gramps/gui/editors/displaytabs/webembedlist.py @@ -112,10 +112,10 @@ class WebEmbedList(EmbeddedList): def get_popup_menu_items(self): return [ - (True, _('_Add'), 'list-add', self.add_button_clicked), - (False, _('_Edit'), 'gtk-edit', self.edit_button_clicked), - (True, _('_Remove'), 'list-remove', self.del_button_clicked), - (True, _('_Jump to'), 'go-jump', self.jump_button_clicked), + (True, _('_Add'), self.add_button_clicked), + (False, _('_Edit'), self.edit_button_clicked), + (True, _('_Remove'), self.del_button_clicked), + (True, _('_Jump to'), self.jump_button_clicked), ] def jump_button_clicked(self, obj): diff --git a/gramps/gui/editors/editfamily.py b/gramps/gui/editors/editfamily.py index 9b04897e1..33c412826 100644 --- a/gramps/gui/editors/editfamily.py +++ b/gramps/gui/editors/editfamily.py @@ -144,13 +144,11 @@ class ChildEmbedList(EmbeddedList): def get_popup_menu_items(self): return [ - (False, _('Edit child'), 'gtk-edit', - self.edit_child_button_clicked), - (True, _('_Add'), 'list-add', self.add_button_clicked), - (True, _('Add an existing child'), None, self.share_button_clicked), - (False, _('Edit relationship'), 'gtk-edit', - self.edit_button_clicked), - (True, _('_Remove'), 'list-remove', self.del_button_clicked), + (False, _('Edit child'), self.edit_child_button_clicked), + (True, _('_Add'), self.add_button_clicked), + (True, _('Add an existing child'), self.share_button_clicked), + (False, _('Edit relationship'), self.edit_button_clicked), + (True, _('_Remove'), self.del_button_clicked), ] def get_middle_click(self):