diff --git a/ChangeLog b/ChangeLog index 6d0871e2a..75ea589db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-27 Benny Malengier + * src/GrampsDb/_ReadXML.py: don't create empty objects in bookmarks + * src/Bookmarks.py: don't store duplicates, backport + 2008-02-02 Raphael Ackermann * src/GrampsDb/_WriteGedcom.py * src/plugins/WriteGeneWeb.py diff --git a/src/Bookmarks.py b/src/Bookmarks.py index 8987bac29..aa6cf76a3 100644 --- a/src/Bookmarks.py +++ b/src/Bookmarks.py @@ -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): diff --git a/src/GrampsDb/_ReadXML.py b/src/GrampsDb/_ReadXML.py index ce571410f..08a11fd2d 100644 --- a/src/GrampsDb/_ReadXML.py +++ b/src/GrampsDb/_ReadXML.py @@ -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)