Mercurial > hg > octave-nkf
diff libinterp/octave.cc @ 17828:6b787e274eb1
make -q suppress no graphical display startup message (bug #38937)
* display.h, display.cc (display_info::err_msg): New member variable.
(display_info::display_available): Return initialization error message.
(display_info::init): Set err_message instead of calling warning.
* octave.cc (check_starting_gui): Maybe display display_info
initialization error message as a warning message.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 01 Nov 2013 21:42:06 -0400 |
parents | ef4fc092c86b |
children | e432697a0621 |
line wrap: on
line diff
--- a/libinterp/octave.cc +++ b/libinterp/octave.cc @@ -891,9 +891,18 @@ static bool check_starting_gui (void) { - if (no_window_system || ! display_info::display_available ()) + if (no_window_system) return false; + std::string err_msg; + if (! display_info::display_available (err_msg)) + { + if (! (inhibit_startup_message || err_msg.empty ())) + warning (err_msg.c_str ()); + + return false; + } + if (force_gui_option) return true;