2007-10-03 Benny Malengier <benny.malengier@gramps-project.org>
* src/GrampsDb/_GrampsDbBase.py: copy bookmark list, don't reference * src/GrampsDbUtils/_ReadXML.py: only add bookmarks if not present already, #1187 svn: r9071
This commit is contained in:
parent
a0ab7fd642
commit
cd67c7b13d
@ -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/GrampsDbUtils/_ReadXML.py: only add bookmarks if not present already, #1187
|
||||
|
||||
2007-10-03 Benny Malengier <benny.malengier@gramps-project.org>
|
||||
* src/Spell.py: add gtkspell bug workaround, see eg issue 1272, 1091, ...
|
||||
|
||||
|
@ -97,7 +97,7 @@ class GrampsDbBookmarks:
|
||||
self.bookmarks = list(default) # want a copy (not an alias)
|
||||
|
||||
def set(self, new_list):
|
||||
self.bookmarks = new_list
|
||||
self.bookmarks = list(new_list)
|
||||
|
||||
def get(self):
|
||||
return self.bookmarks
|
||||
|
@ -880,28 +880,36 @@ class GrampsParser(UpdateCallback):
|
||||
# Make sure those are filtered out.
|
||||
# Bookmarks are at end, so all handle must exist before we do bookmrks
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
elif target == 'note':
|
||||
if self.db.find_note_from_handle(handle, self.trans) is not None:
|
||||
if (self.db.find_note_from_handle(handle, self.trans) is not None
|
||||
and handle not in self.db.note_bookmarks.get() ):
|
||||
self.db.note_bookmarks.append(handle)
|
||||
|
||||
def start_format(self, attrs):
|
||||
|
Loading…
Reference in New Issue
Block a user