* src/RelLib.py (Event): Add a list to store external witnesses.

svn: r4787
This commit is contained in:
Alex Roitman 2005-06-05 05:16:27 +00:00
parent 704780e868
commit 719319baac
2 changed files with 20 additions and 1 deletions

View File

@ -4,6 +4,8 @@
2005-06-04 Alex Roitman <shura@gramps-project.org>
* various: merge changes made in gramps20 branch with main trunk.
* src/RelLib.py (Event): Add a list to store external witnesses.
2005-06-03 Don Allingham <don@gramps-project.org>
* src/AttrEdit.py: support get_type/set_type in dropdown menu
* src/EditPerson.py: remove items properly based off EventRef

View File

@ -2213,10 +2213,12 @@ class Event(PrimaryObject,PrivateSourceNote,MediaBase,DateBase,PlaceBase):
self.description = source.description
self.type = source.type
self.cause = source.cause
self.ext_witness_list = source.ext_witness_list
else:
self.description = ""
self.type = (Event.CUSTOM,"")
self.cause = ""
self.ext_witness_list = []
def serialize(self):
"""
@ -2417,7 +2419,22 @@ class Event(PrimaryObject,PrivateSourceNote,MediaBase,DateBase,PlaceBase):
@return: Returns the description of the Event
@rtype: str
"""
return self.description
return self.description
def add_ext_witness(self,witness):
self.ext_witness_list.append(witness)
def remove_ext_witness(self,witness):
if witness in self.ext_witness_list:
self.ext_witness_list.remove(witness)
return True
return False
def get_ext_witness_list(self):
return self.ext_witness_list
def set_ext_witness_list(self,witness_list):
self.ext_witness_list = witness_list
class Place(PrimaryObject,SourceNote,MediaBase):
"""