From f50a1f68ea71c9e91fa7e91b7f4ef3a7652b8ce3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Sat, 13 Dec 2008 15:11:34 +0000 Subject: [PATCH] Could not convert file: don't warn me to death git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27869 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Converter.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Converter.cpp b/src/Converter.cpp index ab7e51f912..b9c31bd00e 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -302,6 +302,14 @@ bool Converters::convert(Buffer const * buffer, return true; } } + + // only warn once per session and per file type + static std::map warned; + if (warned.find(from_format) != warned.end() && warned.find(from_format)->second == to_format) { + return false; + } + warned.insert(make_pair(from_format, to_format)); + Alert::error(_("Cannot convert file"), bformat(_("No information for converting %1$s " "format files to %2$s.\n" -- 2.39.5