* src/Viewmanager.py: prompt before abandoning changes

svn: r7620
This commit is contained in:
Don Allingham 2006-11-13 02:42:07 +00:00
parent b4a0f30356
commit b5fa169927
2 changed files with 17 additions and 5 deletions

View File

@ -1,4 +1,5 @@
2006-11-12 Don Allingham <don@gramps-project.org>
* src/Viewmanager.py: prompt before abandoning changes
* src/GrampsDb/_WriteGedcom.py: RepoRefs don't have a privacy flag
2006-11-11 Don Allingham <don@gramps-project.org>

View File

@ -463,13 +463,24 @@ class ViewManager:
"""
Abandon changes and quit.
"""
from QuestionDialog import QuestionDialog2, WarningDialog
if self.state.db.abort_possible:
d = QuestionDialog2(
_("Abort changes?"),
_("Aborting changes will return the database to the state "
"is was before you started this editing session."),
_("Abort changes"),
_("Cancel"))
if d.run():
self.state.db.disable_signals()
while self.state.db.undo():
pass
self.quit()
else:
QuestionDialog.WarningDialog(
WarningDialog(
_("Cannot abandon session's changes"),
_('Changes cannot be completely abandoned because the '
'number of changes made in the session exceeded the '