* src/RelLib.py: Delegate event handle reference lookup from

Person to EventRef class; (RepoRef.get_handle_referents): Remove
unneeded method (inherited from BaseObject).


svn: r4729
This commit is contained in:
Alex Roitman 2005-05-28 16:21:58 +00:00
parent 8969589bae
commit f4f4af3e21
2 changed files with 9 additions and 18 deletions

View File

@ -1,3 +1,8 @@
2005-05-28 Alex Roitman <shura@gramps-project.org>
* src/RelLib.py: Delegate event handle reference lookup from
Person to EventRef class; (RepoRef.get_handle_referents): Remove
unneeded method (inherited from BaseObject).
2005-05-27 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/RelLib.py: RepoRef now derives BaseObject to enable full-text
search

View File

@ -1049,7 +1049,7 @@ class Person(PrimaryObject,PrivateSourceNote,MediaBase,AttributeBase):
return [self.primary_name] + self.media_list + \
self.alternate_names + self.address_list + \
self.attribute_list + self.urls + \
self.source_list + add_list
self.source_list + self.event_ref_list + add_list
def get_sourcref_child_list(self):
"""
@ -1072,13 +1072,8 @@ class Person(PrimaryObject,PrivateSourceNote,MediaBase,AttributeBase):
@return: Returns the list of (classname,handle) tuples for referenced objects.
@rtype: list
"""
ret = []
ret += [('Event',ref.ref) for ref in
self.event_ref_list + [self.birth_ref,self.death_ref]
if ref]
ret += [('Family',handle) for handle in self.family_list
return [('Family',handle) for handle in self.family_list
+ [item[0] for item in self.parent_family_list]]
return ret
def get_handle_referents(self):
"""
@ -1088,7 +1083,8 @@ class Person(PrimaryObject,PrivateSourceNote,MediaBase,AttributeBase):
@return: Returns the list of objects refereincing primary objects.
@rtype: list
"""
return self.get_sourcref_child_list() + self.source_list
return self.get_sourcref_child_list() + self.source_list \
+ self.event_ref_list
def set_complete_flag(self,val):
"""
@ -4401,16 +4397,6 @@ class RepoRef(BaseObject,NoteBase):
else:
return []
def get_handle_referents(self):
"""
Returns the list of child objects which may, directly or through
their children, reference primary objects..
@return: Returns the list of objects refereincing primary objects.
@rtype: list
"""
return []
def set_reference_handle(self,ref):
self.ref = ref