diff --git a/ChangeLog b/ChangeLog index 126cbba9c..5cf1e066f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ 2007-01-19 Don Allingham + * src/GrampsDb/_GrampsDbBase.py: add append_list task + * src/GrampsDb/_ReadGrdb.py: copy bookmarks properly on import * src/DataViews/_FamilyList.py: remove loop * src/PageView.py: check for null model diff --git a/src/GrampsDb/_GrampsDbBase.py b/src/GrampsDb/_GrampsDbBase.py index f1f82ef26..bf6e5c81f 100644 --- a/src/GrampsDb/_GrampsDbBase.py +++ b/src/GrampsDb/_GrampsDbBase.py @@ -167,6 +167,9 @@ class GrampsDbBookmarks: def append(self, item): self.bookmarks.append(item) + def append_list(self, blist): + self.bookmarks += blist + def remove(self, item): self.bookmarks.remove(item) diff --git a/src/GrampsDb/_ReadGrdb.py b/src/GrampsDb/_ReadGrdb.py index 7eec6640e..aa8f582c7 100644 --- a/src/GrampsDb/_ReadGrdb.py +++ b/src/GrampsDb/_ReadGrdb.py @@ -188,13 +188,13 @@ def importData(database, filename, callback=None,cl=0,use_trans=True): # Copy bookmarks over: # we already know that there's no overlap in handles anywhere - database.bookmarks += other_database.bookmarks - database.family_bookmarks += other_database.family_bookmarks - database.event_bookmarks += other_database.event_bookmarks - database.source_bookmarks += other_database.source_bookmarks - database.place_bookmarks += other_database.place_bookmarks - database.media_bookmarks += other_database.media_bookmarks - database.repo_bookmarks += other_database.repo_bookmarks + database.bookmarks.append_list(other_database.bookmarks.get()) + database.family_bookmarks.append_list(other_database.family_bookmarks.get()) + database.event_bookmarks.append_list(other_database.event_bookmarks.get()) + database.source_bookmarks.append_list(other_database.source_bookmarks.get()) + database.place_bookmarks.append_list(other_database.place_bookmarks.get()) + database.media_bookmarks.append_list(other_database.media_bookmarks.get()) + database.repo_bookmarks.append_list(other_database.repo_bookmarks.get()) # close the other database and clean things up other_database.close()