2007-10-03 Benny Malengier <benny.malengier@gramps-project.org>
* src/GrampsDb/_GrampsDbBase.py: copy bookmark list, don't reference * src/GrampsDb/_ReadXML.py: only add bookmarks if not present already, #1187 svn: r9070
This commit is contained in:
parent
d53d49ec5a
commit
c195fa2b29
@ -1,3 +1,7 @@
|
|||||||
|
2007-10-03 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
|
* src/GrampsDb/_GrampsDbBase.py: copy bookmark list, don't reference
|
||||||
|
* src/GrampsDb/_ReadXML.py: only add bookmarks if not present already, #1187
|
||||||
|
|
||||||
2007-10-03 Benny Malengier <benny.malengier@gramps-project.org>
|
2007-10-03 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
* src/Spell.py: add gtkspell bug workaround, see eg issue 1272, 1091, ...
|
* src/Spell.py: add gtkspell bug workaround, see eg issue 1272, 1091, ...
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ class GrampsDbBookmarks:
|
|||||||
self.bookmarks = list(default) # want a copy (not an alias)
|
self.bookmarks = list(default) # want a copy (not an alias)
|
||||||
|
|
||||||
def set(self, new_list):
|
def set(self, new_list):
|
||||||
self.bookmarks = new_list
|
self.bookmarks = list(new_list)
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
return self.bookmarks
|
return self.bookmarks
|
||||||
|
@ -845,25 +845,32 @@ class GrampsParser(UpdateCallback):
|
|||||||
# Make sure those are filtered out.
|
# Make sure those are filtered out.
|
||||||
# Bookmarks are at end, so all handle must exist before we do bookmrks
|
# Bookmarks are at end, so all handle must exist before we do bookmrks
|
||||||
if target == 'person':
|
if target == 'person':
|
||||||
if self.db.find_person_from_handle(handle,self.trans) is not None:
|
if (self.db.find_person_from_handle(handle,self.trans) is not None
|
||||||
|
and handle not in self.db.bookmarks.get() ):
|
||||||
self.db.bookmarks.append(handle)
|
self.db.bookmarks.append(handle)
|
||||||
elif target == 'family':
|
elif target == 'family':
|
||||||
if self.db.find_family_from_handle(handle,self.trans) is not None:
|
if (self.db.find_family_from_handle(handle,self.trans) is not None
|
||||||
|
and handle not in self.db.family_bookmarks.get() ):
|
||||||
self.db.family_bookmarks.append(handle)
|
self.db.family_bookmarks.append(handle)
|
||||||
elif target == 'event':
|
elif target == 'event':
|
||||||
if self.db.find_event_from_handle(handle,self.trans) is not None:
|
if (self.db.find_event_from_handle(handle,self.trans) is not None
|
||||||
|
and handle not in self.db.event_bookmarks.get() ):
|
||||||
self.db.event_bookmarks.append(handle)
|
self.db.event_bookmarks.append(handle)
|
||||||
elif target == 'source':
|
elif target == 'source':
|
||||||
if self.db.find_source_from_handle(handle,self.trans) is not None:
|
if (self.db.find_source_from_handle(handle,self.trans) is not None
|
||||||
|
and handle not in self.db.source_bookmarks.get() ):
|
||||||
self.db.source_bookmarks.append(handle)
|
self.db.source_bookmarks.append(handle)
|
||||||
elif target == 'place':
|
elif target == 'place':
|
||||||
if self.db.find_place_from_handle(handle,self.trans) is not None:
|
if (self.db.find_place_from_handle(handle,self.trans) is not None
|
||||||
|
and handle not in self.db.place_bookmarks.get() ):
|
||||||
self.db.place_bookmarks.append(handle)
|
self.db.place_bookmarks.append(handle)
|
||||||
elif target == 'media':
|
elif target == 'media':
|
||||||
if self.db.find_object_from_handle(handle,self.trans) is not None:
|
if (self.db.find_object_from_handle(handle,self.trans) is not None
|
||||||
|
and handle not in self.db.media_bookmarks.get() ):
|
||||||
self.db.media_bookmarks.append(handle)
|
self.db.media_bookmarks.append(handle)
|
||||||
elif target == 'repository':
|
elif target == 'repository':
|
||||||
if self.db.find_repository_from_handle(handle,self.trans) is not None:
|
if (self.db.find_repository_from_handle(handle,self.trans)
|
||||||
|
is not None and handle not in self.db.repo_bookmarks.get()):
|
||||||
self.db.repo_bookmarks.append(handle)
|
self.db.repo_bookmarks.append(handle)
|
||||||
|
|
||||||
def start_format(self,attrs):
|
def start_format(self,attrs):
|
||||||
|
Loading…
Reference in New Issue
Block a user