# HG changeset patch # User Jacob Dawid # Date 1347555575 -7200 # Node ID 027898e1d21c1c0c767a880da2b029ff1273a13b # Parent 181319fb0c8bf4d68d78fd3f461442322b5d17d7# Parent e4ecc18a24ccdb9825bba41998ddeb25715a1c4a Merge. diff -r 181319fb0c8b -r 027898e1d21c libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Thu Sep 13 18:59:00 2012 +0200 +++ b/libgui/src/m-editor/file-editor-tab.cc Thu Sep 13 18:59:35 2012 +0200 @@ -596,8 +596,7 @@ if (openFileName.isEmpty ()) return false; - load_file(openFileName); - return true; + return load_file(openFileName); } else { diff -r 181319fb0c8b -r 027898e1d21c libgui/src/octave-gui.cc --- a/libgui/src/octave-gui.cc Thu Sep 13 18:59:00 2012 +0200 +++ b/libgui/src/octave-gui.cc Thu Sep 13 18:59:35 2012 +0200 @@ -82,6 +82,8 @@ { dissociate_terminal (); + setenv ("GNUTERM", "qt", 1); + QApplication application (argc, argv); while (true) diff -r 181319fb0c8b -r 027898e1d21c scripts/plot/__gnuplot_drawnow__.m --- a/scripts/plot/__gnuplot_drawnow__.m Thu Sep 13 18:59:00 2012 +0200 +++ b/scripts/plot/__gnuplot_drawnow__.m Thu Sep 13 18:59:35 2012 +0200 @@ -74,7 +74,7 @@ else new_stream = false; endif - term = gnuplot_default_term (); + term = gnuplot_default_term (plot_stream); if (strcmp (term, "dumb")) ## popen2 eats stdout of gnuplot, use temporary file instead dumb_tmp_file = tmpnam (); @@ -114,7 +114,7 @@ ## When "term" originates from print.m, it may include other options. if (nargin < 4) ## This supports the gnuplot graphics toolkit. - term = gnuplot_default_term (); + term = gnuplot_default_term (plot_stream); opts_str = ""; else ## Get the one word terminal id and save the remaining as options to @@ -132,7 +132,7 @@ if (strfind (opts_str, "noenhanced")) enhanced = false; else - enhanced = gnuplot_is_enhanced_term (term); + enhanced = gnuplot_is_enhanced_term (plot_stream, term); endif ## Set the terminal. @@ -329,10 +329,10 @@ endfunction -function term = gnuplot_default_term () +function term = gnuplot_default_term (plot_stream) term = getenv ("GNUTERM"); ## If not specified, guess the terminal type. - if (isempty (term)) + if (isempty (term) || ! __gnuplot_has_terminal__ (term, plot_stream)) if (ismac ()) term = "aqua"; elseif (! isunix ()) @@ -358,24 +358,24 @@ endif endfunction -function have_enhanced = gnuplot_is_enhanced_term (term) +function have_enhanced = gnuplot_is_enhanced_term (plot_stream, term) persistent enhanced_terminals; if (isempty (enhanced_terminals)) ## Don't include pstex, pslatex or epslatex here as the TeX commands ## should not be interpreted in that case. enhanced_terminals = {"aqua", "canvas", "dumb", "emf", "gif", "jpeg", ... "pdf", "pdfcairo", "pm", "png", "pngcairo", ... - "postscript", "svg", "windows", "wxt", "x11"}; + "postscript", "qt", "svg", "windows", "wxt", "x11"}; endif - if (nargin < 1) + if (nargin < 2) ## Determine the default gnuplot terminal. - term = gnuplot_default_term (); + term = gnuplot_default_term (plot_stream); endif have_enhanced = any (strncmp (enhanced_terminals, term, min (numel (term), 3))); endfunction function ret = output_to_screen (term) - ret = any (strcmpi ({"aqua", "dumb", "wxt", "x11", "windows", "pm"}, term)); + ret = any (strcmpi ({"aqua", "dumb", "pm", "qt", "windows", "wxt", "x11"}, term)); endfunction function retval = have_non_legend_axes (h)