remember custom attributes/events

svn: r6248
This commit is contained in:
Don Allingham
2006-03-31 23:46:34 +00:00
parent 37c33490cb
commit 371c34ef1b
9 changed files with 268 additions and 106 deletions

View File

@@ -403,7 +403,7 @@ class GrampsDbBase(GrampsDBCallback):
for attr in person.attribute_list:
self.individual_attributes.add(attr.type)
self.marker_names.add(person.marker[1])
def commit_media_object(self,obj,transaction,change_time=None):
@@ -859,6 +859,24 @@ class GrampsDbBase(GrampsDBCallback):
self.find_next_event_gramps_id,
self.commit_event)
def add_person_event(self,event,transaction):
"""
Adds an Event to the database, assigning internal IDs if they have
not already been defined.
"""
if event.type[0] == Event.CUSTOM:
self.individual_event_names.add(event.type[1])
return self.add_event(event,transaction)
def add_family_event(self,event,transaction):
"""
Adds an Event to the database, assigning internal IDs if they have
not already been defined.
"""
if event.type[0] == Event.CUSTOM:
self.family_event_names.add(event.type[1])
return self.add_event(event,transaction)
def add_place(self,place,transaction):
"""
Adds a Place to the database, assigning internal IDs if they have