From b5fa16992796823b3ad845506a1c8df69bcd1d89 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 --- gramps2/ChangeLog | 1 + gramps2/src/ViewManager.py | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 5b67b0b83..dce1652b4 100644 --- a/gramps2/ChangeLog +++ b/gramps2/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/gramps2/src/ViewManager.py b/gramps2/src/ViewManager.py index 85d72931c..3241493d4 100644 --- a/gramps2/src/ViewManager.py +++ b/gramps2/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 '