Write the warnings and errors both to lyxerr and to the dialog.

If the mode is nogui don't raise the dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16827 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-01-23 14:29:15 +00:00
parent 6823d09f6b
commit 278e4a7326

View File

@ -53,23 +53,23 @@ int Alert::prompt(docstring const & title, docstring const & question,
void Alert::warning(docstring const & title, docstring const & message)
{
if (!use_gui || lyxerr.debugging())
lyxerr << "Warning: " << to_utf8(title) << '\n'
<< "----------------------------------------\n"
<< to_utf8(message) << endl;
lyxerr << "Warning: " << to_utf8(title) << '\n'
<< "----------------------------------------\n"
<< to_utf8(message) << endl;
warning_pimpl(title, message);
if (use_gui)
warning_pimpl(title, message);
}
void Alert::error(docstring const & title, docstring const & message)
{
if (!use_gui || lyxerr.debugging())
lyxerr << "Error: " << to_utf8(title) << '\n'
<< "----------------------------------------\n"
<< to_utf8(message) << endl;
lyxerr << "Error: " << to_utf8(title) << '\n'
<< "----------------------------------------\n"
<< to_utf8(message) << endl;
error_pimpl(title, message);
if (use_gui)
error_pimpl(title, message);
}