* 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:
parent
568ba555b1
commit
6d46005a71
@ -7,6 +7,10 @@
|
|||||||
* src/GrampsDb/_GrampsBSDDB.py (transaction_begin): Disconnect
|
* src/GrampsDb/_GrampsBSDDB.py (transaction_begin): Disconnect
|
||||||
unneeded secondary indices; (transaction_commit): Create new
|
unneeded secondary indices; (transaction_commit): Create new
|
||||||
secondary indices to replace the ones removed.
|
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>
|
2006-01-19 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
|
||||||
* src/ListBox.py: added import for gettext
|
* src/ListBox.py: added import for gettext
|
||||||
|
@ -1063,7 +1063,7 @@ class GrampsDbBase(GrampsDBCallback):
|
|||||||
"""
|
"""
|
||||||
self.rprefix = self._validated_id_prefix(val,"R")
|
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
|
Creates a new Transaction tied to the current UNDO database. The
|
||||||
transaction has no effect until it is committed using the
|
transaction has no effect until it is committed using the
|
||||||
@ -1072,7 +1072,7 @@ class GrampsDbBase(GrampsDBCallback):
|
|||||||
if self.__LOG_ALL:
|
if self.__LOG_ALL:
|
||||||
log.debug("%s: Transaction begin '%s'\n"
|
log.debug("%s: Transaction begin '%s'\n"
|
||||||
% (self.__class__.__name__, str(msg)))
|
% (self.__class__.__name__, str(msg)))
|
||||||
return Transaction(msg,self.undodb)
|
return Transaction(msg,self.undodb,batch)
|
||||||
|
|
||||||
def transaction_commit(self,transaction,msg):
|
def transaction_commit(self,transaction,msg):
|
||||||
"""
|
"""
|
||||||
@ -1795,9 +1795,8 @@ class Transaction:
|
|||||||
self.repository_del = []
|
self.repository_del = []
|
||||||
self.repository_update = []
|
self.repository_update = []
|
||||||
|
|
||||||
|
## def set_batch(self,batch):
|
||||||
def set_batch(self,batch):
|
## self.batch = batch
|
||||||
self.batch = batch
|
|
||||||
|
|
||||||
def get_batch(self):
|
def get_batch(self):
|
||||||
return self.batch
|
return self.batch
|
||||||
|
@ -159,8 +159,7 @@ class ChangeNames(Tool.Tool):
|
|||||||
self.window.present()
|
self.window.present()
|
||||||
|
|
||||||
def on_ok_clicked(self,obj):
|
def on_ok_clicked(self,obj):
|
||||||
self.trans = self.db.transaction_begin()
|
self.trans = self.db.transaction_begin("",batch=True)
|
||||||
self.trans.set_batch(True)
|
|
||||||
self.db.disable_signals()
|
self.db.disable_signals()
|
||||||
changelist = []
|
changelist = []
|
||||||
for node in self.iter_list:
|
for node in self.iter_list:
|
||||||
|
Loading…
Reference in New Issue
Block a user