From 8058b51624c744bc7e0bfd0ff9d848ca4d955607 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 17 Nov 2006 05:17:13 +0000 Subject: [PATCH] 2006-11-16 Don Allingham * src/DataViews/_RelationView.py: share parents button * src/images/share-fam.png: share parents button * src/gramps_main.py: share parents button svn: r7638 --- ChangeLog | 5 +++++ src/DataViews/_RelationView.py | 26 ++++++++++++++++++++++++-- src/gramps_main.py | 4 ++++ src/images/share-fam.png | Bin 0 -> 4453 bytes 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/images/share-fam.png diff --git a/ChangeLog b/ChangeLog index 8ec4f9a72..97cf05f52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-16 Don Allingham + * 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 * src/Reorder.py: Import gettext. diff --git a/src/DataViews/_RelationView.py b/src/DataViews/_RelationView.py index b990bba10..c5d0fd8d6 100644 --- a/src/DataViews/_RelationView.py +++ b/src/DataViews/_RelationView.py @@ -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): + @@ -276,6 +275,7 @@ class RelationshipView(PageView.PersonNavView): + @@ -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() diff --git a/src/gramps_main.py b/src/gramps_main.py index 3e425cd66..225ff5428 100644 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -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 diff --git a/src/images/share-fam.png b/src/images/share-fam.png new file mode 100644 index 0000000000000000000000000000000000000000..ae7546588959c66ebd0fe9331c6d56c9e7055368 GIT binary patch literal 4453 zcmV-r5t{CaP)0FiV> zSad^gZEa<4bO1zUb8B>Oa4mCbdSzrFX=8703OzkNJv}`=Jv}`=JqijaV<{jqFfcSA zN?~htVjw4KX>Dy`V<#X}bY*F7WpXSa3TSk6a5^t9YH4k4VPh_Bb#rNBXklz@E@OHM z3S)9*VRU6=Aa`kWXdrZG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