Update
svn: r7071
This commit is contained in:
parent
51c468f672
commit
871180a272
@ -4,10 +4,11 @@
|
|||||||
* src/docgen/OpenOfficeDoc.py: fix rotation angle
|
* src/docgen/OpenOfficeDoc.py: fix rotation angle
|
||||||
|
|
||||||
2006-07-24 Alex Roitman <shura@gramps-project.org>
|
2006-07-24 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Map Other from
|
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Map "Other
|
||||||
gramps2.0.x to Unknown.
|
Name" from gramps2.0.x to the "Unknown" name type;
|
||||||
* src/GrampsDb/_ReadXML.py (start_name): Map Other from
|
work out the case of no events.
|
||||||
gramps2.0.x to Unknown.
|
* src/GrampsDb/_ReadXML.py (start_name): Map "Other Name" from
|
||||||
|
gramps2.0.x to the "Unknown" name type.
|
||||||
(start_database): Add method to extract the XML version.
|
(start_database): Add method to extract the XML version.
|
||||||
* src/DisplayTabs/_BackRefModel.py (BackRefModel.load_model):
|
* src/DisplayTabs/_BackRefModel.py (BackRefModel.load_model):
|
||||||
Translate displayed object type.
|
Translate displayed object type.
|
||||||
|
@ -1474,8 +1474,8 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
|||||||
for name in [person.primary_name] + person.alternate_names:
|
for name in [person.primary_name] + person.alternate_names:
|
||||||
old_type = name.type
|
old_type = name.type
|
||||||
new_type = NameType()
|
new_type = NameType()
|
||||||
# Mapping "Other" from gramps 2.0.x to Unknown
|
# Mapping "Other Name" from gramps 2.0.x to Unknown
|
||||||
if old_type == 'Other':
|
if old_type == 'Other Name':
|
||||||
new_type.set(NameType.UNKNOWN)
|
new_type.set(NameType.UNKNOWN)
|
||||||
else:
|
else:
|
||||||
new_type.set_from_xml_str(old_type)
|
new_type.set_from_xml_str(old_type)
|
||||||
@ -1554,9 +1554,12 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
|||||||
# Find the largest ID and extract the integer:
|
# Find the largest ID and extract the integer:
|
||||||
# We can do this because in 2.0.x the event id is never exposed
|
# We can do this because in 2.0.x the event id is never exposed
|
||||||
eid_list.sort()
|
eid_list.sort()
|
||||||
last_id = eid_list[-1]
|
if len(eid_list) == 0:
|
||||||
nre = re.compile("\D+(\d+)")
|
max_id_number = 0
|
||||||
max_id_number = int(nre.match(last_id).groups()[0])
|
else:
|
||||||
|
last_id = eid_list[-1]
|
||||||
|
nre = re.compile("\D+(\d+)")
|
||||||
|
max_id_number = int(nre.match(last_id).groups()[0])
|
||||||
|
|
||||||
# get the list of all IDs that are non-unique
|
# get the list of all IDs that are non-unique
|
||||||
dup_ids = [eid for eid in eid_list if eid_list.count(eid) > 1 ]
|
dup_ids = [eid for eid in eid_list if eid_list.count(eid) > 1 ]
|
||||||
|
@ -1016,8 +1016,8 @@ class GrampsParser(UpdateCallback):
|
|||||||
if not self.in_witness:
|
if not self.in_witness:
|
||||||
self.name = RelLib.Name()
|
self.name = RelLib.Name()
|
||||||
name_type = attrs['type']
|
name_type = attrs['type']
|
||||||
# Mapping "Other" from gramps 2.0.x to Unknown
|
# Mapping "Other Name" from gramps 2.0.x to Unknown
|
||||||
if (self.version_string == '1.0.0') and (name_type == 'Other'):
|
if (self.version_string=='1.0.0') and (name_type=='Other Name'):
|
||||||
self.name.set_type(RelLib.NameType.UNKNOWN)
|
self.name.set_type(RelLib.NameType.UNKNOWN)
|
||||||
else:
|
else:
|
||||||
self.name.type.set_from_xml_str(name_type)
|
self.name.type.set_from_xml_str(name_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user