* src/ImageSelect.py: Add date/place property to media objects

* src/ReadXML.py: Add date/place property to media objects
* src/RelLib.py: Add date/place property to media objects
* src/WriteXML.py: Add date/place property to media objects
* src/gramps.glade: Add date/place property to media objects
* src/SelectObject.py: display gramps id instead of internal handle


svn: r3707
This commit is contained in:
Don Allingham
2004-11-06 03:31:34 +00:00
parent 02c1c5c99a
commit 9f86c80af1
7 changed files with 294 additions and 18 deletions

View File

@@ -832,14 +832,21 @@ class XmlWriter:
self.g.write(' description="%s"' % self.fix(obj.get_description()))
alist = obj.get_attribute_list()
note = obj.get_note()
phandle = obj.get_place_handle()
dval = obj.get_date_object()
slist = obj.get_source_references()
if len(alist) == 0 and len(slist) == 0 and note == "":
if len(alist) == 0 and len(slist) == 0 and note == "" and \
phandle == "" and not dval.is_empty():
self.g.write('/>\n')
else:
self.g.write('>\n')
self.write_attribute_list(alist)
if note != "":
self.write_note("note",obj.get_note_object(),3)
if phandle:
self.g.write(' <place ref="%s"/>\n' % phandle)
if not dval.is_empty():
self.write_date(dval,3)
for s in slist:
self.dump_source_ref(s,3)
self.g.write(" </object>\n")