Mercurial > hg > octave-nkf
changeset 15379:027898e1d21c
Merge.
author | Jacob Dawid <jacob.dawid@cybercatalyst.net> |
---|---|
date | Thu, 13 Sep 2012 18:59:35 +0200 |
parents | 181319fb0c8b (current diff) e4ecc18a24cc (diff) |
children | 9453acf885f2 |
files | |
diffstat | 3 files changed, 13 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -596,8 +596,7 @@ if (openFileName.isEmpty ()) return false; - load_file(openFileName); - return true; + return load_file(openFileName); } else {
--- a/libgui/src/octave-gui.cc +++ b/libgui/src/octave-gui.cc @@ -82,6 +82,8 @@ { dissociate_terminal (); + setenv ("GNUTERM", "qt", 1); + QApplication application (argc, argv); while (true)
--- a/scripts/plot/__gnuplot_drawnow__.m +++ b/scripts/plot/__gnuplot_drawnow__.m @@ -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)