* src/GrampsDbUtils/_ParseGedcom.py: check for MARR event in std_event,
not in family_even * src/RelLib/_FamilyRelType.py: default marriage type to unknown * src/GrampsDbUtils/_WriteGedcom.py: Don't add description to EVEN tag 2007-08-20 Don Allingham <don@gramps-project.org> svn: r8846
This commit is contained in:
parent
30e6e38f2c
commit
21c59e9e8f
@ -1,6 +1,12 @@
|
||||
2007-08-20 Jérôme Rapinat <romjerome@yahoo.fr>
|
||||
* src/Relationship.py: Fix array bounds check.
|
||||
|
||||
2007-08-20 Don Allingham <don@gramps-project.org>
|
||||
* src/GrampsDbUtils/_ParseGedcom.py: check for MARR event in std_event,
|
||||
not in family_even
|
||||
* src/RelLib/_FamilyRelType.py: default marriage type to unknown
|
||||
* src/GrampsDbUtils/_WriteGedcom.py: Don't add description to EVEN tag
|
||||
|
||||
2007-08-20 Don Allingham <don@gramps-project.org>
|
||||
* src/ScratchPad.py (ScratchPadSourceRef.__init__): handle the removal
|
||||
of the get_text() function
|
||||
|
@ -2568,6 +2568,18 @@ class GedcomParser(UpdateCallback):
|
||||
|
||||
self.__parse_level(sub_state, self.event_parse_tbl, self.__undefined)
|
||||
|
||||
if int(event.get_type()) == RelLib.EventType.MARRIAGE:
|
||||
descr = event.get_description()
|
||||
print "EVENT", str(event.get_type()), descr
|
||||
if descr == "Civil Union":
|
||||
state.family.type.set(RelLib.FamilyRelType.CIVIL_UNION)
|
||||
event.set_description('')
|
||||
elif descr == "Unmarried":
|
||||
state.family.type.set(RelLib.FamilyRelType.UNMARRIED)
|
||||
event.set_description('')
|
||||
else:
|
||||
state.family.type.set(RelLib.FamilyRelType.MARRIED)
|
||||
|
||||
family_event_name(event, state.family, self.dbase)
|
||||
self.dbase.commit_event(event, self.trans)
|
||||
event_ref.ref = event.handle
|
||||
@ -2600,18 +2612,6 @@ class GedcomParser(UpdateCallback):
|
||||
|
||||
self.__parse_level(sub_state, self.event_parse_tbl, self.__undefined)
|
||||
|
||||
if int(event.get_type()) == RelLib.EventType.MARRIAGE:
|
||||
|
||||
descr = event.get_description()
|
||||
if descr == "Civil Union":
|
||||
state.family.type.set(RelLib.FamilyRelType.CIVIL_UNION)
|
||||
event.set_description('')
|
||||
elif descr == "Unmarried":
|
||||
state.family.type.set(RelLib.FamilyRelType.UNMARRIED)
|
||||
event.set_description('')
|
||||
else:
|
||||
state.family.type.set(RelLib.FamilyRelType.MARRIED)
|
||||
|
||||
family_event_name(event, state.family, self.dbase)
|
||||
|
||||
self.dbase.commit_event(event, self.trans)
|
||||
|
@ -692,14 +692,7 @@ class GedcomWriter(UpdateCallback):
|
||||
if event.get_description().strip():
|
||||
self.__writeln(2, 'TYPE', event.get_description())
|
||||
else:
|
||||
# Actually, it is against the spec to put anything
|
||||
# after EVEN on the same line, possibly an option is
|
||||
# needed on how to handle this
|
||||
|
||||
if event.get_description().strip() != "":
|
||||
self.__writeln(1, 'EVEN', event.get_description())
|
||||
else:
|
||||
self.__writeln(1, 'EVEN')
|
||||
self.__writeln(1, 'EVEN')
|
||||
if val.strip():
|
||||
self.__writeln(2, 'TYPE', val)
|
||||
else:
|
||||
|
@ -53,4 +53,6 @@ class FamilyRelType(GrampsType):
|
||||
_E2IMAP = init_map(_DATAMAP, 2, 0)
|
||||
|
||||
def __init__(self, value=None):
|
||||
if value == None:
|
||||
value = self.UNKNOWN
|
||||
GrampsType.__init__(self, value)
|
||||
|
Loading…
Reference in New Issue
Block a user