From 202e0356d7b22e40b82469f36e5095dbe0cb8e40 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Wed, 27 Feb 2008 13:03:41 +0000 Subject: [PATCH] 2008-02-27 Brian Matherly * src/GrampsDbUtils/_ReadXML.py: Don't allow newer Gramps files to be imported (#0001722). svn: r10130 --- ChangeLog | 4 ++++ src/GrampsDbUtils/_ReadXML.py | 19 ++++++------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c3f2cb8b..27977807c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-27 Brian Matherly + * src/GrampsDbUtils/_ReadXML.py: + Don't allow newer Gramps files to be imported (#0001722). + 2008-02-27 Stéphane Charette * src/plugins/GVFamilyLines.py: 0001549: use standard date formats for FamilyLines diff --git a/src/GrampsDbUtils/_ReadXML.py b/src/GrampsDbUtils/_ReadXML.py index f59d0fa1f..405325977 100644 --- a/src/GrampsDbUtils/_ReadXML.py +++ b/src/GrampsDbUtils/_ReadXML.py @@ -37,7 +37,7 @@ import re # Gramps Modules # #------------------------------------------------------------------------- -from QuestionDialog import ErrorDialog, QuestionDialog2 +from QuestionDialog import ErrorDialog import Mime import gen.lib import Utils @@ -2206,21 +2206,14 @@ def version_is_valid(filename, cli): if parser.get_xmlns_version() > _GrampsDbWriteXML.XML_VERSION: msg = _("The .gramps file you are importing was made by version %s of " "GRAMPS, while you are running an older version %s. " - "The file might include parts which cannot be understood by " - "this version of GRAMPS and will be discarded upon import." + "The file will not be imported. Please upgrade to the latest " + "version of GRAMPS and try again." ) % (parser.get_gramps_version(), const.VERSION) if cli: print msg - print _('Enter "Yes" to continue with import.') - response = sys.stdin.read() - if response not in ["Yes", "yes"]: - return False + return False else: - prompt = QuestionDialog2( _("Import Newer File?"), msg, - _("Continue with import"), - _("Do not import newer file") ) - response = prompt.run() - if response is False: - return False + ErrorDialog(msg) + return False return True