]> git.lyx.org Git - features.git/commitdiff
Write the warnings and errors both to lyxerr and to the dialog.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 23 Jan 2007 14:29:15 +0000 (14:29 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 23 Jan 2007 14:29:15 +0000 (14:29 +0000)
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

src/frontends/Alert.C

index 8c5980297740b909ece91396370b9ee6abf9ec99..a339b8b015ea3cb11671648b178661fd5a4c94df 100644 (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);
 }