From feeae34b013f96ec7890c5a10ca0dbfafeee12e0 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 13 Nov 2006 02:42:07 +0000 Subject: [PATCH] * src/Viewmanager.py: prompt before abandoning changes svn: r7620 --- ChangeLog | 1 + src/ViewManager.py | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b67b0b83..dce1652b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ 2006-11-12 Don Allingham + * src/Viewmanager.py: prompt before abandoning changes * src/GrampsDb/_WriteGedcom.py: RepoRefs don't have a privacy flag 2006-11-11 Don Allingham diff --git a/src/ViewManager.py b/src/ViewManager.py index 85d72931c..3241493d4 100644 --- a/src/ViewManager.py +++ b/src/ViewManager.py @@ -463,13 +463,24 @@ class ViewManager: """ Abandon changes and quit. """ + from QuestionDialog import QuestionDialog2, WarningDialog + if self.state.db.abort_possible: - self.state.db.disable_signals() - while self.state.db.undo(): - pass - self.quit() + + 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 '