(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 a8b358725d
commit 896142ea23
4 changed files with 14 additions and 4 deletions

View File

@ -1,9 +1,11 @@
2006-05-03 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsInMemDB.py (abort_changes): Remove method.
* src/GrampsDb/_GrampsDbBase.py (abort_changes): Remove method.
(GrampsDbBase.transaction_begin): No aborting after batch transaction.
* src/GrampsDb/_GrampsBSDDB.py (undo,redo): Use the status from
GrampsDbBase undo/redo;
(abort_changes): Remove method.
(GrampsBSDDB.transaction_begin): No aborting after batch transaction.
* src/ViewManager.py (abort): Add method for abandoning changes.
* configure.in: Set release to 0.SVN.

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 = []