* src/plugins/ChangeNames.py (on_ok_clicked): Properly set batch

transaction.
* src/GrampsDb/_GrampsDbBase.py (transaction_begin): Add batch
argument; (set_batch): Remove method.


svn: r5800
This commit is contained in:
Alex Roitman 2006-01-19 18:18:55 +00:00
parent bb6b86ed01
commit 65753f7ece
3 changed files with 9 additions and 7 deletions

View File

@ -7,6 +7,10 @@
* src/GrampsDb/_GrampsBSDDB.py (transaction_begin): Disconnect
unneeded secondary indices; (transaction_commit): Create new
secondary indices to replace the ones removed.
* src/plugins/ChangeNames.py (on_ok_clicked): Properly set batch
transaction.
* src/GrampsDb/_GrampsDbBase.py (transaction_begin): Add batch
argument; (set_batch): Remove method.
2006-01-19 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
* src/ListBox.py: added import for gettext

View File

@ -1063,7 +1063,7 @@ class GrampsDbBase(GrampsDBCallback):
"""
self.rprefix = self._validated_id_prefix(val,"R")
def transaction_begin(self,msg=""):
def transaction_begin(self,msg="",batch=False):
"""
Creates a new Transaction tied to the current UNDO database. The
transaction has no effect until it is committed using the
@ -1072,7 +1072,7 @@ class GrampsDbBase(GrampsDBCallback):
if self.__LOG_ALL:
log.debug("%s: Transaction begin '%s'\n"
% (self.__class__.__name__, str(msg)))
return Transaction(msg,self.undodb)
return Transaction(msg,self.undodb,batch)
def transaction_commit(self,transaction,msg):
"""
@ -1795,9 +1795,8 @@ class Transaction:
self.repository_del = []
self.repository_update = []
def set_batch(self,batch):
self.batch = batch
## def set_batch(self,batch):
## self.batch = batch
def get_batch(self):
return self.batch

View File

@ -159,8 +159,7 @@ class ChangeNames(Tool.Tool):
self.window.present()
def on_ok_clicked(self,obj):
self.trans = self.db.transaction_begin()
self.trans.set_batch(True)
self.trans = self.db.transaction_begin("",batch=True)
self.db.disable_signals()
changelist = []
for node in self.iter_list: