2007-05-09 Benny Malengier <bm@cage.ugent.be>
* src/GrampsDb/_ReadXML.py: partly fix #1053, import privacy of person, family, media, source, place and repo correct. Still to do: sourceref and lds_ordinance svn: r8457
This commit is contained in:
parent
1751a86a92
commit
0b14279856
@ -1,3 +1,7 @@
|
|||||||
|
2007-05-09 Benny Malengier <bm@cage.ugent.be>
|
||||||
|
* src/GrampsDb/_ReadXML.py: partly fix #1053, import privacy of person, family,
|
||||||
|
media, source, place and repo correct. Still to do: sourceref and lds_ordinance
|
||||||
|
|
||||||
2007-05-10 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2007-05-10 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/DataViews/_PedigreeView.py: Some rendering fixes for RTL locales
|
* src/DataViews/_PedigreeView.py: Some rendering fixes for RTL locales
|
||||||
|
|
||||||
|
@ -686,6 +686,9 @@ class GrampsParser(UpdateCallback):
|
|||||||
self.placeobj.set_gramps_id(gramps_id)
|
self.placeobj.set_gramps_id(gramps_id)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.placeobj = self.find_place_by_gramps_id(gramps_id)
|
self.placeobj = self.find_place_by_gramps_id(gramps_id)
|
||||||
|
|
||||||
|
self.placeobj.private = bool(attrs.get("priv"))
|
||||||
|
|
||||||
# GRAMPS LEGACY: title in the placeobj tag
|
# GRAMPS LEGACY: title in the placeobj tag
|
||||||
self.placeobj.title = attrs.get('title','')
|
self.placeobj.title = attrs.get('title','')
|
||||||
self.locations = 0
|
self.locations = 0
|
||||||
@ -892,6 +895,7 @@ class GrampsParser(UpdateCallback):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
self.person = self.find_person_by_gramps_id(new_id)
|
self.person = self.find_person_by_gramps_id(new_id)
|
||||||
|
|
||||||
|
self.person.private = bool(attrs.get("priv"))
|
||||||
# Old and new markers: complete=1 and marker=word both have to work
|
# Old and new markers: complete=1 and marker=word both have to work
|
||||||
if attrs.get('complete'): # this is only true for complete=1
|
if attrs.get('complete'): # this is only true for complete=1
|
||||||
self.person.marker.set(RelLib.MarkerType.COMPLETE)
|
self.person.marker.set(RelLib.MarkerType.COMPLETE)
|
||||||
@ -988,6 +992,9 @@ class GrampsParser(UpdateCallback):
|
|||||||
self.family.set_gramps_id(gramps_id)
|
self.family.set_gramps_id(gramps_id)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.family = self.find_family_by_gramps_id(gramps_id)
|
self.family = self.find_family_by_gramps_id(gramps_id)
|
||||||
|
|
||||||
|
self.family.private = bool(attrs.get("priv"))
|
||||||
|
|
||||||
# GRAMPS LEGACY: the type now belongs to <rel> tag
|
# GRAMPS LEGACY: the type now belongs to <rel> tag
|
||||||
# Here we need to support old format of <family type="Married">
|
# Here we need to support old format of <family type="Married">
|
||||||
if attrs.has_key('type'):
|
if attrs.has_key('type'):
|
||||||
@ -1136,6 +1143,8 @@ class GrampsParser(UpdateCallback):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
self.source = self.find_source_by_gramps_id(gramps_id)
|
self.source = self.find_source_by_gramps_id(gramps_id)
|
||||||
|
|
||||||
|
self.source.private = bool(attrs.get("priv"))
|
||||||
|
|
||||||
def start_reporef(self,attrs):
|
def start_reporef(self,attrs):
|
||||||
self.reporef = RelLib.RepoRef()
|
self.reporef = RelLib.RepoRef()
|
||||||
try:
|
try:
|
||||||
@ -1188,6 +1197,7 @@ class GrampsParser(UpdateCallback):
|
|||||||
# the old format of <object src="blah"...>
|
# the old format of <object src="blah"...>
|
||||||
self.object.mime = attrs.get('mime','')
|
self.object.mime = attrs.get('mime','')
|
||||||
self.object.desc = attrs.get('description','')
|
self.object.desc = attrs.get('description','')
|
||||||
|
self.object.private = bool(attrs.get("priv"))
|
||||||
src = attrs.get("src",'')
|
src = attrs.get("src",'')
|
||||||
if src:
|
if src:
|
||||||
if not os.path.isabs(src):
|
if not os.path.isabs(src):
|
||||||
@ -1204,6 +1214,8 @@ class GrampsParser(UpdateCallback):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
self.repo = self.find_repository_by_gramps_id(gramps_id)
|
self.repo = self.find_repository_by_gramps_id(gramps_id)
|
||||||
|
|
||||||
|
self.repo.private = bool(attrs.get("priv"))
|
||||||
|
|
||||||
def stop_people(self,*tag):
|
def stop_people(self,*tag):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -1225,6 +1237,7 @@ class GrampsParser(UpdateCallback):
|
|||||||
self.reporef = None
|
self.reporef = None
|
||||||
|
|
||||||
def start_photo(self,attrs):
|
def start_photo(self,attrs):
|
||||||
|
#legacy object, not anymore written
|
||||||
self.photo = RelLib.MediaObject()
|
self.photo = RelLib.MediaObject()
|
||||||
self.pref = RelLib.MediaRef()
|
self.pref = RelLib.MediaRef()
|
||||||
self.pref.set_reference_handle(self.photo.get_handle())
|
self.pref.set_reference_handle(self.photo.get_handle())
|
||||||
@ -1234,6 +1247,7 @@ class GrampsParser(UpdateCallback):
|
|||||||
self.photo.set_description(attrs[key])
|
self.photo.set_description(attrs[key])
|
||||||
elif key == "priv":
|
elif key == "priv":
|
||||||
self.pref.set_privacy(int(attrs[key]))
|
self.pref.set_privacy(int(attrs[key]))
|
||||||
|
self.photo.set_privacy(int(attrs[key]))
|
||||||
elif key == "src":
|
elif key == "src":
|
||||||
src = attrs["src"]
|
src = attrs["src"]
|
||||||
if not os.path.isabs(src):
|
if not os.path.isabs(src):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user