bug 9787; fix right-click menus crash caused by PR268

This commit is contained in:
prculley 2016-11-14 08:46:38 -06:00
parent 4ffc5e3af4
commit bd142c0744
4 changed files with 17 additions and 19 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):