* src/GrampsDb/_ReadXML.py: Parse old and new XML.
* src/GrampsDb/_WriteXML.py (dump_child_ref, dump_person_ref): Add methods. * src/RelLib/_ChildRef.py (ChildRef.set_mother_relation): Adapt to new types; (ChildRef.set_father_relation): Adapt to new types. * src/RelLib/_GrampsType.py (GrampsType.get_custom): Add method. (GrampsType.set): Allow setting from the same class instance. (GrampsType.is_default): Add method. svn: r6358
This commit is contained in:
@@ -127,8 +127,7 @@ class ChildRef(BaseObject,PrivacyBase,SourceBase,NoteBase,RefBase):
|
||||
|
||||
def set_mother_relation(self,rel):
|
||||
"""Sets relation between the person and mother"""
|
||||
assert(isinstance(rel,ChildRefType))
|
||||
self.mrel = rel
|
||||
self.mrel.set(rel)
|
||||
|
||||
def get_mother_relation(self):
|
||||
"""Returns the relation between the person and mother"""
|
||||
@@ -136,8 +135,7 @@ class ChildRef(BaseObject,PrivacyBase,SourceBase,NoteBase,RefBase):
|
||||
|
||||
def set_father_relation(self,frel):
|
||||
"""Sets relation between the person and father"""
|
||||
assert(isinstance(frel,ChildRefType))
|
||||
self.frel = frel
|
||||
self.frel.set(frel)
|
||||
|
||||
def get_father_relation(self):
|
||||
"""Returns the relation between the person and father"""
|
||||
|
Reference in New Issue
Block a user