# HG changeset patch # User Mike Miller # Date 1354326090 18000 # Node ID 916ef285522a051834c3aabcd81491c830fa739e # Parent d803cd07f31a0d52c06024020c3e7d57749c54da Use the Qt gnuplot terminal only if available when using the GUI * octave-gui.cc (octave_start_gui): Do not set GNUTERM. * __gnuplot_drawnow__.m: Use the qt terminal only if gnuplot supports it and the GUI is running. diff --git a/libgui/src/octave-gui.cc b/libgui/src/octave-gui.cc --- a/libgui/src/octave-gui.cc +++ b/libgui/src/octave-gui.cc @@ -83,8 +83,6 @@ { dissociate_terminal (); - octave_env::putenv ("GNUTERM", "qt"); - QApplication application (argc, argv); while (true) diff --git a/scripts/plot/__gnuplot_drawnow__.m b/scripts/plot/__gnuplot_drawnow__.m --- a/scripts/plot/__gnuplot_drawnow__.m +++ b/scripts/plot/__gnuplot_drawnow__.m @@ -333,7 +333,9 @@ term = getenv ("GNUTERM"); ## If not specified, guess the terminal type. if (isempty (term) || ! __gnuplot_has_terminal__ (term, plot_stream)) - if (ismac ()) + if (isguirunning () && __gnuplot_has_terminal__ ("qt", plot_stream)) + term = "qt"; + elseif (ismac ()) term = "aqua"; elseif (! isunix ()) term = "windows";