* 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:
Alex Roitman
2006-04-19 02:23:08 +00:00
parent 01ad261c0a
commit d55901a3a4
5 changed files with 124 additions and 42 deletions

View File

@@ -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"""