diff --git a/ChangeLog b/ChangeLog index b2e2ad6e4..bc6572bab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-06-13 Don Allingham + * src/Editors/_EditLdsOrd.py: LDS confirmation support + * src/GrampsDb/_ReadGedcom.py: LDS confirmation support + * src/GrampsDb/_WriteGedcom.py: LDS confirmation support + * src/GrampsDb/_GedTokens.py: LDS confirmation support + * src/GrampsDb/_LdsOrdd.py: LDS confirmation support + 2006-06-13 Alex Roitman * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Avoid using secondary index when upgrading events; manually resolve duplicate IDs. diff --git a/src/Editors/_EditLdsOrd.py b/src/Editors/_EditLdsOrd.py index 229525929..76485e799 100644 --- a/src/Editors/_EditLdsOrd.py +++ b/src/Editors/_EditLdsOrd.py @@ -71,6 +71,18 @@ _DATA_MAP = { RelLib.LdsOrd.STATUS_SUBMITTED, RelLib.LdsOrd.STATUS_UNCLEARED, ], + RelLib.LdsOrd.CONFIRMATION : [ + RelLib.LdsOrd.STATUS_NONE, + RelLib.LdsOrd.STATUS_CHILD, + RelLib.LdsOrd.STATUS_CLEARED, + RelLib.LdsOrd.STATUS_COMPLETED, + RelLib.LdsOrd.STATUS_INFANT, + RelLib.LdsOrd.STATUS_PRE_1970, + RelLib.LdsOrd.STATUS_QUALIFIED, + RelLib.LdsOrd.STATUS_STILLBORN, + RelLib.LdsOrd.STATUS_SUBMITTED, + RelLib.LdsOrd.STATUS_UNCLEARED, + ], RelLib.LdsOrd.ENDOWMENT: [ RelLib.LdsOrd.STATUS_NONE, RelLib.LdsOrd.STATUS_CHILD, @@ -148,6 +160,7 @@ class EditLdsOrd(EditSecondary): def _get_types(self): return (RelLib.LdsOrd.BAPTISM, RelLib.LdsOrd.ENDOWMENT, + RelLib.LdsOrd.CONFIRMATION, RelLib.LdsOrd.SEAL_TO_PARENTS) def _setup_fields(self): diff --git a/src/GrampsDb/_GedTokens.py b/src/GrampsDb/_GedTokens.py index 87c30ecad..3b812aa9a 100644 --- a/src/GrampsDb/_GedTokens.py +++ b/src/GrampsDb/_GedTokens.py @@ -127,6 +127,7 @@ TOKEN_MEDI = 107 TOKEN_RELA = 108 TOKEN__LKD = 109 TOKEN_BLOB = 110 +TOKEN_CONL = 111 tokens = { "HEAD" : TOKEN_HEAD, "MEDI" : TOKEN_MEDI, @@ -218,4 +219,5 @@ tokens = { "_SCBK" : TOKEN_IGNORE,"_TYPE" : TOKEN_IGNORE, "_PRIM" : TOKEN_IGNORE,"_SSHOW" : TOKEN_IGNORE, "_PAREN" : TOKEN_IGNORE,"BLOB" : TOKEN_BLOB, + "CONL" : TOKEN_CONL, } diff --git a/src/GrampsDb/_ReadGedcom.py b/src/GrampsDb/_ReadGedcom.py index cf5f40783..b38a5ed37 100644 --- a/src/GrampsDb/_ReadGedcom.py +++ b/src/GrampsDb/_ReadGedcom.py @@ -603,6 +603,7 @@ class GedcomParser(UpdateCallback): TOKEN__COMM : self.func_person_note, TOKEN_SEX : self.func_person_sex, TOKEN_BAPL : self.func_person_bapl, + TOKEN_CONL : self.func_person_conl, TOKEN_ENDL : self.func_person_endl, TOKEN_SLGC : self.func_person_slgc, TOKEN_FAMS : self.func_person_fams, @@ -2632,6 +2633,12 @@ class GedcomParser(UpdateCallback): state.person.lds_ord_list.append(lds_ord) self.parse_ord(lds_ord,2) + def func_person_conl(self,matches,state): + lds_ord = RelLib.LdsOrd() + lds_ord.set_type(RelLib.LdsOrd.CONFIRMATION) + state.person.lds_ord_list.append(lds_ord) + self.parse_ord(lds_ord,2) + def func_person_endl(self,matches,state): lds_ord = RelLib.LdsOrd() lds_ord.set_type(RelLib.LdsOrd.ENDOWMENT) diff --git a/src/GrampsDb/_WriteGedcom.py b/src/GrampsDb/_WriteGedcom.py index 0b0400846..a298b9c5c 100644 --- a/src/GrampsDb/_WriteGedcom.py +++ b/src/GrampsDb/_WriteGedcom.py @@ -120,6 +120,7 @@ lds_ord_name = { RelLib.LdsOrd.ENDOWMENT : 'ENDL', RelLib.LdsOrd.SEAL_TO_PARENTS : 'SLGC', RelLib.LdsOrd.SEAL_TO_SPOUSE : 'SGLS', + RelLib.LdsOrd.CONFIRMATION : 'CONL', } lds_status = { diff --git a/src/RelLib/_LdsOrd.py b/src/RelLib/_LdsOrd.py index 57d5331a0..79c5db076 100644 --- a/src/RelLib/_LdsOrd.py +++ b/src/RelLib/_LdsOrd.py @@ -63,6 +63,7 @@ class LdsOrd(SecondaryObject,SourceBase,NoteBase, ENDOWMENT = 1 SEAL_TO_PARENTS = 2 SEAL_TO_SPOUSE = 3 + CONFIRMATION = 4 DEFAULT_TYPE = BAPTISM @@ -88,6 +89,7 @@ class LdsOrd(SecondaryObject,SourceBase,NoteBase, _TYPE_MAP = [ (BAPTISM, _('Baptism'), 'baptism'), (ENDOWMENT, _('Endowment'), 'endowment'), + (CONFIRMATION, _('Confirmation'), 'confirmation'), (SEAL_TO_PARENTS, _('Sealed to Parents'), 'sealed_to_parents'), (SEAL_TO_SPOUSE, _('Sealed to Spouse'), 'sealed_to_spouse' ), ]