2008-02-27 Benny Malengier <benny.malengier@gramps-project.org>

* src/GrampsDb/_ReadXML.py: don't create empty objects in bookmarks
	* src/Bookmarks.py: don't store duplicates, backport



svn: r10129
This commit is contained in:
Benny Malengier 2008-02-27 10:44:52 +00:00
parent 967a48abdc
commit 677af32e5e
3 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,7 @@
2008-02-27 Benny Malengier <benny.malengier@gramps-project.org>
* src/GrampsDb/_ReadXML.py: don't create empty objects in bookmarks
* src/Bookmarks.py: don't store duplicates, backport
2008-02-02 Raphael Ackermann <raphael.ackermann@gmail.com>
* src/GrampsDb/_WriteGedcom.py
* src/plugins/WriteGeneWeb.py

View File

@ -104,6 +104,7 @@ class Bookmarks :
if self.active != DISABLED:
self.uistate.uimanager.remove_ui(self.active)
self.uistate.uimanager.remove_action_group(self.action_group)
self.action_group = gtk.ActionGroup('Bookmarks')
self.active = DISABLED
def redraw_and_report_change(self):

View File

@ -860,31 +860,31 @@ 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.get_person_from_handle(handle) 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.get_family_from_handle(handle) 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.get_event_from_handle(handle) 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.get_source_from_handle(handle) 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.get_place_from_handle(handle) 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.get_object_from_handle(handle) 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)
if (self.db.get_repository_from_handle(handle)
is not None and handle not in self.db.repo_bookmarks.get()):
self.db.repo_bookmarks.append(handle)