* src/GrampsDb/_GrampsBSDDB.py (load): Better non-TXN support.
* src/UndoHistory.py (__init__): Rename list to tree. svn: r6589
This commit is contained in:
parent
bb10a41a60
commit
f2a73acbea
@ -1,4 +1,7 @@
|
|||||||
2006-05-08 Alex Roitman <shura@gramps-project.org>
|
2006-05-08 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* 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/DataViews/_PersonView.py (delete_person_response): Use child_ref.
|
||||||
* src/plugins/Leak.py: Typo.
|
* src/plugins/Leak.py: Typo.
|
||||||
* src/plugins/Eval.py: Convert to ManagedWindow.
|
* src/plugins/Eval.py: Convert to ManagedWindow.
|
||||||
|
@ -296,6 +296,9 @@ class GrampsBSDDB(GrampsDbBase):
|
|||||||
|
|
||||||
callback(12)
|
callback(12)
|
||||||
|
|
||||||
|
self.full_name = os.path.abspath(name)
|
||||||
|
self.brief_name = os.path.basename(name)
|
||||||
|
|
||||||
self.env = db.DBEnv()
|
self.env = db.DBEnv()
|
||||||
self.env.set_cachesize(0,0x2000000) # 16MB
|
self.env.set_cachesize(0,0x2000000) # 16MB
|
||||||
self.env.set_lk_max_locks(25000)
|
self.env.set_lk_max_locks(25000)
|
||||||
@ -307,22 +310,20 @@ class GrampsBSDDB(GrampsDbBase):
|
|||||||
env_flags = db.DB_CREATE|db.DB_RECOVER|db.DB_PRIVATE|\
|
env_flags = db.DB_CREATE|db.DB_RECOVER|db.DB_PRIVATE|\
|
||||||
db.DB_INIT_MPOOL|db.DB_INIT_LOCK|\
|
db.DB_INIT_MPOOL|db.DB_INIT_LOCK|\
|
||||||
db.DB_INIT_LOG|db.DB_INIT_TXN|db.DB_THREAD
|
db.DB_INIT_LOG|db.DB_INIT_TXN|db.DB_THREAD
|
||||||
else:
|
|
||||||
env_flags = db.DB_CREATE|db.DB_PRIVATE|\
|
|
||||||
db.DB_INIT_MPOOL|db.DB_INIT_LOG
|
|
||||||
|
|
||||||
env_name = os.path.expanduser(const.bsddbenv_dir)
|
env_name = os.path.expanduser(const.bsddbenv_dir)
|
||||||
if not os.path.isdir(env_name):
|
if not os.path.isdir(env_name):
|
||||||
os.mkdir(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
|
||||||
|
|
||||||
self.env.open(env_name,env_flags)
|
self.env.open(env_name,env_flags)
|
||||||
if self.UseTXN:
|
if self.UseTXN:
|
||||||
self.env.txn_checkpoint()
|
self.env.txn_checkpoint()
|
||||||
|
|
||||||
callback(25)
|
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.family_map = self.open_table(self.full_name, "family")
|
||||||
|
@ -82,20 +82,20 @@ class UndoHistory(ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
scrolled_window = gtk.ScrolledWindow()
|
scrolled_window = gtk.ScrolledWindow()
|
||||||
scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
|
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.model = gtk.ListStore(str, str)
|
||||||
self.selection = self.list.get_selection()
|
self.selection = self.tree.get_selection()
|
||||||
|
|
||||||
self.list.set_model(self.model)
|
self.tree.set_model(self.model)
|
||||||
self.list.set_rules_hint(True)
|
self.tree.set_rules_hint(True)
|
||||||
self.list.append_column(
|
self.tree.append_column(
|
||||||
gtk.TreeViewColumn(_('Original time'), gtk.CellRendererText(),
|
gtk.TreeViewColumn(_('Original time'), gtk.CellRendererText(),
|
||||||
text=0))
|
text=0))
|
||||||
self.list.append_column(
|
self.tree.append_column(
|
||||||
gtk.TreeViewColumn(_('Action'), gtk.CellRendererText(),
|
gtk.TreeViewColumn(_('Action'), gtk.CellRendererText(),
|
||||||
text=1))
|
text=1))
|
||||||
|
|
||||||
scrolled_window.add(self.list)
|
scrolled_window.add(self.tree)
|
||||||
self.window.vbox.add(scrolled_window)
|
self.window.vbox.add(scrolled_window)
|
||||||
self.window.show_all()
|
self.window.show_all()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user