diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index ee386f087..c09efdf2c 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -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 * src/ListBox.py: added import for gettext diff --git a/gramps2/src/GrampsDb/_GrampsDbBase.py b/gramps2/src/GrampsDb/_GrampsDbBase.py index efb3d139c..e2e917982 100644 --- a/gramps2/src/GrampsDb/_GrampsDbBase.py +++ b/gramps2/src/GrampsDb/_GrampsDbBase.py @@ -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 diff --git a/gramps2/src/plugins/ChangeNames.py b/gramps2/src/plugins/ChangeNames.py index 9c8242ee2..185e41ae6 100644 --- a/gramps2/src/plugins/ChangeNames.py +++ b/gramps2/src/plugins/ChangeNames.py @@ -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: