2007-12-31 Gary Burton <gary.burton@zen.co.uk>

* src/DataViews/RelationView.py:
	* src/Editors/_EditFamily.py: Add a signal handler for changes to events.
	bug #1416 and #1329. Also remove previous attempt at fixing #1416 now that
	I know a bit more about how signal handling works.



svn: r9660
This commit is contained in:
Gary Burton 2007-12-31 19:23:16 +00:00
parent 122c77e2de
commit 9726d358bd
3 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2007-12-31 Gary Burton <gary.burton@zen.co.uk>
* src/DataViews/RelationView.py:
* src/Editors/_EditFamily.py: Add a signal handler for changes to events.
bug #1416 and #1329. Also remove previous attempt at fixing #1416 now that
I know a bit more about how signal handling works.
2007-12-31 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/DefaultGadgets.py: added Date to environment
* src/gen/lib/date.py: added new Date constructor type: Date(y,m,d)

View File

@ -161,6 +161,9 @@ class RelationshipView(PageView.PersonNavView):
self.redraw()
def connect_to_db(self, db):
# Add a signal to pick up event changes, bug #1416
db.connect('event-update', self.family_update)
db.connect('person-update', self.person_update)
db.connect('person-rebuild', self.person_rebuild)
db.connect('family-update', self.family_update)

View File

@ -427,6 +427,9 @@ class EditFamily(EditPrimary):
self._add_db_signal('family-update', self.check_for_family_change)
self._add_db_signal('family-delete', self.check_for_close)
# Add a signal pick up changes to events, bug #1329
self._add_db_signal('event-update', self.event_updated)
self.added = self.obj.handle == None
if self.added:
self.obj.handle = Utils.create_id()
@ -457,6 +460,9 @@ class EditFamily(EditPrimary):
"database is not corrupted, GRAMPS has updated the family to "
"reflect these changes. Any edits you have made may have been lost."))
def event_updated(self, obj):
self.load_data()
def reload_people(self):
fhandle = self.obj.get_father_handle()
self.update_father(fhandle)
@ -942,14 +948,6 @@ class EditFamily(EditPrimary):
else:
self.db.commit_family(self.obj,trans)
self.db.transaction_commit(trans,_("Edit Family"))
else:
# Signal an update to allow other windows that use family data to
# refresh. The family-update signal is normally only emitted when
# the family record itself changes, however the Relationship view
# needs to know to refresh when related data such as the marriage
# event may have been altered.
# Bug #1416
self.db.emit('family-update', ([],))
self.close()