From f2a73acbea989535c3691721a900982b0770c238 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Mon, 8 May 2006 23:18:16 +0000 Subject: [PATCH] * src/GrampsDb/_GrampsBSDDB.py (load): Better non-TXN support. * src/UndoHistory.py (__init__): Rename list to tree. svn: r6589 --- gramps2/ChangeLog | 3 +++ gramps2/src/GrampsDb/_GrampsBSDDB.py | 15 ++++++++------- gramps2/src/UndoHistory.py | 14 +++++++------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 757650f4a..7352c89a2 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,7 @@ 2006-05-08 Alex Roitman + * src/GrampsDb/_GrampsBSDDB.py (load): Better non-TXN support. + * src/UndoHistory.py (__init__): Rename list to tree. + * src/DataViews/_PersonView.py (delete_person_response): Use child_ref. * src/plugins/Leak.py: Typo. * src/plugins/Eval.py: Convert to ManagedWindow. diff --git a/gramps2/src/GrampsDb/_GrampsBSDDB.py b/gramps2/src/GrampsDb/_GrampsBSDDB.py index 369457e59..baa0f8101 100644 --- a/gramps2/src/GrampsDb/_GrampsBSDDB.py +++ b/gramps2/src/GrampsDb/_GrampsBSDDB.py @@ -296,6 +296,9 @@ class GrampsBSDDB(GrampsDbBase): callback(12) + self.full_name = os.path.abspath(name) + self.brief_name = os.path.basename(name) + self.env = db.DBEnv() self.env.set_cachesize(0,0x2000000) # 16MB self.env.set_lk_max_locks(25000) @@ -307,23 +310,21 @@ class GrampsBSDDB(GrampsDbBase): env_flags = db.DB_CREATE|db.DB_RECOVER|db.DB_PRIVATE|\ db.DB_INIT_MPOOL|db.DB_INIT_LOCK|\ db.DB_INIT_LOG|db.DB_INIT_TXN|db.DB_THREAD + env_name = os.path.expanduser(const.bsddbenv_dir) + if not os.path.isdir(env_name): + os.mkdir(env_name) 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(const.bsddbenv_dir) - if not os.path.isdir(env_name): - os.mkdir(env_name) self.env.open(env_name,env_flags) if self.UseTXN: self.env.txn_checkpoint() callback(25) - self.full_name = os.path.abspath(name) - self.brief_name = os.path.basename(name) - - 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") diff --git a/gramps2/src/UndoHistory.py b/gramps2/src/UndoHistory.py index 13dc6894d..74f0efdb5 100644 --- a/gramps2/src/UndoHistory.py +++ b/gramps2/src/UndoHistory.py @@ -82,20 +82,20 @@ class UndoHistory(ManagedWindow.ManagedWindow): scrolled_window = gtk.ScrolledWindow() scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC) - self.list = gtk.TreeView() + self.tree = gtk.TreeView() self.model = gtk.ListStore(str, str) - self.selection = self.list.get_selection() + self.selection = self.tree.get_selection() - self.list.set_model(self.model) - self.list.set_rules_hint(True) - self.list.append_column( + self.tree.set_model(self.model) + self.tree.set_rules_hint(True) + self.tree.append_column( gtk.TreeViewColumn(_('Original time'), gtk.CellRendererText(), text=0)) - self.list.append_column( + self.tree.append_column( gtk.TreeViewColumn(_('Action'), gtk.CellRendererText(), text=1)) - scrolled_window.add(self.list) + scrolled_window.add(self.tree) self.window.vbox.add(scrolled_window) self.window.show_all()