5914: Cannot save bookmarked citations into Gramps XML file format
svn: r20048
This commit is contained in:
parent
ff5aa4101d
commit
800d6aef45
@ -383,7 +383,7 @@ BOOKMARKS
|
|||||||
<!ELEMENT bookmarks (bookmark)*>
|
<!ELEMENT bookmarks (bookmark)*>
|
||||||
<!ELEMENT bookmark EMPTY>
|
<!ELEMENT bookmark EMPTY>
|
||||||
<!ATTLIST bookmark
|
<!ATTLIST bookmark
|
||||||
target (person|family|event|source|place|media|repository|
|
target (person|family|event|source|citation|place|media|repository|
|
||||||
note) #REQUIRED
|
note) #REQUIRED
|
||||||
hlink IDREF #REQUIRED
|
hlink IDREF #REQUIRED
|
||||||
>
|
>
|
||||||
|
@ -546,6 +546,7 @@
|
|||||||
<value>family</value>
|
<value>family</value>
|
||||||
<value>event</value>
|
<value>event</value>
|
||||||
<value>source</value>
|
<value>source</value>
|
||||||
|
<value>citation</value>
|
||||||
<value>place</value>
|
<value>place</value>
|
||||||
<value>media</value>
|
<value>media</value>
|
||||||
<value>repository</value>
|
<value>repository</value>
|
||||||
|
@ -365,6 +365,7 @@ class GrampsXmlWriter(UpdateCallback):
|
|||||||
bm_family_len = len(self.db.family_bookmarks.get())
|
bm_family_len = len(self.db.family_bookmarks.get())
|
||||||
bm_event_len = len(self.db.event_bookmarks.get())
|
bm_event_len = len(self.db.event_bookmarks.get())
|
||||||
bm_source_len = len(self.db.source_bookmarks.get())
|
bm_source_len = len(self.db.source_bookmarks.get())
|
||||||
|
bm_citation_len = len(self.db.citation_bookmarks.get())
|
||||||
bm_place_len = len(self.db.place_bookmarks.get())
|
bm_place_len = len(self.db.place_bookmarks.get())
|
||||||
bm_repo_len = len(self.db.repo_bookmarks.get())
|
bm_repo_len = len(self.db.repo_bookmarks.get())
|
||||||
bm_obj_len = len(self.db.media_bookmarks.get())
|
bm_obj_len = len(self.db.media_bookmarks.get())
|
||||||
@ -372,7 +373,7 @@ class GrampsXmlWriter(UpdateCallback):
|
|||||||
|
|
||||||
bm_len = (bm_person_len + bm_family_len + bm_event_len +
|
bm_len = (bm_person_len + bm_family_len + bm_event_len +
|
||||||
bm_source_len + bm_place_len + bm_repo_len +
|
bm_source_len + bm_place_len + bm_repo_len +
|
||||||
bm_obj_len + bm_note_len
|
bm_citation_len + bm_obj_len + bm_note_len
|
||||||
)
|
)
|
||||||
|
|
||||||
if bm_len > 0:
|
if bm_len > 0:
|
||||||
@ -390,6 +391,9 @@ class GrampsXmlWriter(UpdateCallback):
|
|||||||
for handle in self.db.get_source_bookmarks().get():
|
for handle in self.db.get_source_bookmarks().get():
|
||||||
self.g.write(' <bookmark target="source" hlink="_%s"/>\n'
|
self.g.write(' <bookmark target="source" hlink="_%s"/>\n'
|
||||||
% handle )
|
% handle )
|
||||||
|
for handle in self.db.get_citation_bookmarks().get():
|
||||||
|
self.g.write(' <bookmark target="citation" hlink="_%s"/>\n'
|
||||||
|
% handle )
|
||||||
for handle in self.db.get_place_bookmarks().get():
|
for handle in self.db.get_place_bookmarks().get():
|
||||||
self.g.write(' <bookmark target="place" hlink="_%s"/>\n'
|
self.g.write(' <bookmark target="place" hlink="_%s"/>\n'
|
||||||
% handle )
|
% handle )
|
||||||
|
@ -1286,6 +1286,10 @@ class GrampsParser(UpdateCallback):
|
|||||||
if (self.db.get_source_from_handle(handle) is not None
|
if (self.db.get_source_from_handle(handle) is not None
|
||||||
and handle not in self.db.source_bookmarks.get() ):
|
and handle not in self.db.source_bookmarks.get() ):
|
||||||
self.db.source_bookmarks.append(handle)
|
self.db.source_bookmarks.append(handle)
|
||||||
|
elif target == 'citation':
|
||||||
|
if (self.db.get_citation_from_handle(handle) is not None
|
||||||
|
and handle not in self.db.citation_bookmarks.get() ):
|
||||||
|
self.db.citation_bookmarks.append(handle)
|
||||||
elif target == 'place':
|
elif target == 'place':
|
||||||
if (self.db.get_place_from_handle(handle) is not None
|
if (self.db.get_place_from_handle(handle) is not None
|
||||||
and handle not in self.db.place_bookmarks.get() ):
|
and handle not in self.db.place_bookmarks.get() ):
|
||||||
|
Loading…
Reference in New Issue
Block a user