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
This commit is contained in:
Peter Kümmel 2008-12-13 15:11:34 +00:00
parent 009e239108
commit f50a1f68ea

View File

@ -302,6 +302,14 @@ bool Converters::convert(Buffer const * buffer,
return true;
}
}
// only warn once per session and per file type
static std::map<string, string> 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"