(GrampsDbBase.transaction_begin): No aborting after batch transaction.

(GrampsBSDDB.transaction_begin): No aborting after batch transaction.


svn: r6537
This commit is contained in:
Alex Roitman
2006-05-03 23:36:10 +00:00
parent 7011115d16
commit 715e7b2b86
4 changed files with 14 additions and 4 deletions

View File

@@ -1062,6 +1062,10 @@ class GrampsBSDDB(GrampsDbBase):
transaction_commit function of the this database object.
"""
if batch:
# A batch transaction does not store the commits
# Aborting the session completely will become impossible.
self.abort_possible = False
transaction = BdbTransaction(msg,self.undodb,batch,no_magic)
if transaction.batch:
if self.UseTXN:

View File

@@ -1204,6 +1204,10 @@ class GrampsDbBase(GrampsDBCallback):
if self.__LOG_ALL:
log.debug("%s: Transaction begin '%s'\n"
% (self.__class__.__name__, str(msg)))
if batch:
# A batch transaction does not store the commits
# Aborting the session completely will become impossible.
self.abort_possible = False
return Transaction(msg, self.undodb, batch)
def transaction_commit(self, transaction, msg):

View File

@@ -420,10 +420,10 @@ class ViewManager:
self.quit()
else:
QuestionDialog.WarningDialog(
_('Cannot cleanly abandon changes'),
_('Changes cannot be abandoned because the number of '
'changes made exceeded the limit.'))
_("Cannot abandon session's changes"),
_('Changes cannot be completely abandoned because the '
'number of changes made in the session exceeded the '
'limit.'))
def _build_ui_manager(self):
self.merge_ids = []