2006-07-07 Don Allingham <don@gramps-project.org>

* src/Editors/_EditFamily.py: add edit child/relationship options
	in the popup menu
	* src/DisplayTab/_EmbeddedList.py: break out menu specification to
	make it easier to override
	* src/glade/gramps.glade: remove unused objects
	* help/C/figures/place.png: update



svn: r7008
This commit is contained in:
Don Allingham 2006-07-08 04:17:50 +00:00
parent fc53b89370
commit 1d8be1c7a7
5 changed files with 34 additions and 2031 deletions

View File

@ -1,3 +1,11 @@
2006-07-07 Don Allingham <don@gramps-project.org>
* src/Editors/_EditFamily.py: add edit child/relationship options
in the popup menu
* src/DisplayTab/_EmbeddedList.py: break out menu specification to
make it easier to override
* src/glade/gramps.glade: remove unused objects
* help/C/figures/place.png: update
2006-07-07 Brian Matherly <brian@gramps-project.org>
* src/plugins/NarrativeWeb.py: fix restoration of gallery settings

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -95,8 +95,7 @@ class EmbeddedList(ButtonTab):
if ref:
self.right_click(obj, event)
def right_click(self, obj, event):
def get_popup_menu_items(self):
if self.share_btn:
itemlist = [
(True, gtk.STOCK_ADD, self.add_button_clicked),
@ -110,9 +109,12 @@ class EmbeddedList(ButtonTab):
(True, gtk.STOCK_EDIT, self.edit_button_clicked),
(True, gtk.STOCK_REMOVE, self.del_button_clicked),
]
return itemlist
def right_click(self, obj, event):
menu = gtk.Menu()
for (image, title, func) in itemlist:
for (image, title, func) in self.get_popup_menu_items():
if image:
item = gtk.ImageMenuItem(stock_id=title)
else:

View File

@ -116,6 +116,15 @@ class ChildEmbedList(EmbeddedList):
EmbeddedList.__init__(self, dbstate, uistate, track,
_('Children'), ChildModel, True)
def get_popup_menu_items(self):
return [
(True, gtk.STOCK_ADD, self.add_button_clicked),
(False, _('Share'), self.edit_button_clicked),
(True, _('Edit relationship'), self.edit_button_clicked),
(True, _('Edit child'), self.edit_child_button_clicked),
(True, gtk.STOCK_REMOVE, self.del_button_clicked),
]
def find_index(self,obj):
"""
returns the index of the object within the associated data
@ -258,6 +267,18 @@ class ChildEmbedList(EmbeddedList):
ref, self.child_ref_edited)
break
def edit_child_button_clicked(self, obj):
handle = self.get_selected()
if handle:
from Editors import EditPerson
for ref in self.family.get_child_ref_list():
if ref.ref == handle:
p = self.dbstate.db.get_person_from_handle(handle)
EditPerson(self.dbstate, self.uistate, self.track,
p, self.child_ref_edited)
break
def drag_data_received(self, widget, context, x, y, sel_data, info, time):
"""
Handle the standard gtk interface for drag_data_received.

File diff suppressed because it is too large Load Diff