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

* src/DataViews/_RelationView.py: share parents button
	* src/images/share-fam.png: share parents button
	* src/gramps_main.py: share parents button



svn: r7638
This commit is contained in:
Don Allingham 2006-11-17 05:17:13 +00:00
parent ddebbc6664
commit d24d0eaae0
4 changed files with 33 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-11-16 Don Allingham <don@gramps-project.org>
* src/DataViews/_RelationView.py: share parents button
* src/images/share-fam.png: share parents button
* src/gramps_main.py: share parents button
2006-11-16 Alex Roitman <shura@phy.ucsf.edu>
* src/Reorder.py: Import gettext.

View File

@ -111,14 +111,12 @@ class RelationshipView(PageView.PersonNavView):
self, _('Relationships'), dbstate, uistate)
dbstate.connect('database-changed', self.change_db)
#dbstate.connect('active-changed', self.redraw)
self.show_siblings = Config.get(Config.FAMILY_SIBLINGS)
self.show_details = Config.get(Config.FAMILY_DETAILS)
self.connect_to_db(dbstate.db)
self.redrawing = False
self.use_shade = Config.get(Config.RELATION_SHADE)
self.color = gtk.TextView().style.white
#self.color = gtk.Label().style.light[gtk.STATE_NORMAL]
self.child = None
Config.client.notify_add("/apps/gramps/preferences/relation-shade",
self.shade_update)
@ -254,6 +252,7 @@ class RelationshipView(PageView.PersonNavView):
<menu action="EditMenu">
<menuitem action="AddParents"/>
<menuitem action="AddSpouse"/>
<menuitem action="ShareFamily"/>
<menuitem action="ChangeOrder"/>
<menuitem action="FilterEdit"/>
</menu>
@ -276,6 +275,7 @@ class RelationshipView(PageView.PersonNavView):
</placeholder>
<placeholder name="CommonEdit">
<toolitem action="AddParents"/>
<toolitem action="ShareFamily"/>
<toolitem action="AddSpouse"/>
<toolitem action="ChangeOrder"/>
</placeholder>
@ -303,6 +303,8 @@ class RelationshipView(PageView.PersonNavView):
_("Adds a new relationship"), self.add_spouse),
('AddParents', 'gramps-parents', _('Add Parents'), None ,
_("Adds a new set of parents"), self.add_parents),
('ShareFamily', 'gramps-sharefamily', _('Share Parents'), None ,
_("Adds to an existing set of parents"), self.select_parents),
])
self.add_action_group(self.order_action)
@ -1054,6 +1056,26 @@ class RelationshipView(PageView.PersonNavView):
family,
child)
def select_parents(self, obj):
from Selectors import selector_factory
SelectFamily = selector_factory('Family')
phandle = self.dbstate.get_active_person().handle
person = self.dbstate.db.get_person_from_handle(phandle)
skip = set(person.get_family_handle_list())
dialog = SelectFamily(self.dbstate, self.uistate, skip=skip)
family = dialog.run()
if family:
active_handle = self.dbstate.active.handle
child = self.dbstate.db.get_person_from_handle(active_handle)
GrampsDb.add_child_to_family(
self.dbstate.db,
family,
child)
def add_parents(self, obj):
from Editors import EditFamily
family = RelLib.Family()

View File

@ -87,6 +87,8 @@ else:
parents_icon = "parents.svg"
spouse_icon = "spouse.svg"
sharefam_icon = "share-fam.png"
def register_stock_icons ():
items = [
(os.path.join(const.image_dir, person_icon),
@ -127,6 +129,8 @@ def register_stock_icons ():
('gramps-edit-bookmark',_('Edit bookmarks'),gtk.gdk.CONTROL_MASK,0,'')),
(os.path.join(const.image_dir,'stock_insert-url.png'),
('gramps-url',_('URL'),gtk.gdk.CONTROL_MASK,0,'')),
(os.path.join(const.image_dir,'share-fam.png'),
('gramps-sharefamily',_('Share Family'),gtk.gdk.CONTROL_MASK,0,'')),
]
# Register our stock items

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB