* src/GrampsDb/_GrampsDbBase.py: add append_list task
* src/GrampsDb/_ReadGrdb.py: copy bookmarks properly on import svn: r7936
This commit is contained in:
parent
1b9e4e8f50
commit
c2b4c7cdbb
@ -1,4 +1,6 @@
|
||||
2007-01-19 Don Allingham <don@gramps-project.org>
|
||||
* 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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user