* src/GrampsDb/_GrampsBSDDB.py (load_from): Add method.

* src/GrampsDb/_GrampsXMLDB.py (load_from): Add method.
	* src/GrampsDb/_GrampsGEDDB.py (load_from): Add method.
	* src/GrampsDb/_GrampsDbBase.py (load_from): Add method.
	* src/GrampsDb/_WriteGrdb.py: Use db_copy.
	* src/GrampsDb/_DbUtils.py (db_copy): Add function.
	* src/ViewManager.py: Save as support.
	* src/DataViews/_MapView.py (enable_debug): Set to False to be
	able to see the output besides MapView.



svn: r6604
This commit is contained in:
Alex Roitman
2006-05-10 05:52:55 +00:00
parent 545e9d044f
commit cbd84af66b
9 changed files with 281 additions and 88 deletions

View File

@@ -53,6 +53,7 @@ except NameError:
#-------------------------------------------------------------------------
from RelLib import *
from _GrampsDbBase import *
from _DbUtils import db_copy
import const
_MINVERSION = 5
@@ -316,15 +317,14 @@ class GrampsBSDDB(GrampsDbBase):
else:
env_flags = db.DB_CREATE|db.DB_PRIVATE|\
db.DB_INIT_MPOOL|db.DB_INIT_LOG
env_name = self.brief_name
env_name = os.path.expanduser('~')
self.env.open(env_name,env_flags)
if self.UseTXN:
self.env.txn_checkpoint()
callback(25)
self.metadata =self.open_table(self.full_name,"meta",no_txn=True)
self.metadata = self.open_table(self.full_name,"meta",no_txn=True)
self.family_map = self.open_table(self.full_name, "family")
self.place_map = self.open_table(self.full_name, "places")
@@ -386,6 +386,11 @@ class GrampsBSDDB(GrampsDbBase):
return 1
def load_from(self, other_database, filename, callback):
self.load(filename,callback)
db_copy(other_database,self,callback)
return 1
def connect_secondary(self):
"""
This method connects or creates secondary index tables.