octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via envir


From: Mike Miller
Subject: Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable
Date: Mon, 24 Sep 2012 08:15:55 -0400

On Sun, Sep 23, 2012 at 9:36 PM, Ben Abbott wrote:
>
> jeezz ... that doesn't make any sense.  I was too rushed for a coherent post, 
> so I'm back with a bit more patience to improve it ;-)
>
> I was intending that octave-gui.cc include something like below.  With that 
> perhaps __gnuplot_drawnow__.m doesn't need to be changed?
>
>         std::string gnuterm = getenv ("GNUTERM");
>         if (gnuterm.empty ())
>           setenv ("GNUTERM", "qt", 1);

Yeah, that's essentially the first diff I put up on the patch tracker.
This keeps GNUTERM if it was already set but the user still gets the
warning if they don't have Qt gnuplot. If that's the way you guys want
it, that's ok, but I think we may get complaints down the road about
the warning.

Here is the original patch I submitted on this topic, looks a lot like yours :)
https://savannah.gnu.org/patch/?7847#comment3

If you still want it that way I can commit that change.

I do agree with Dan that the Qt gnuplot looks nicer and maybe makes it
look more integrated with the Qt Octave GUI. But I do not agree that
just because you have Qt libraries means that we should assume the
Qt-compiled gnuplot is available.

Here's what I just put into my .octaverc because I'd rather Octave
just figure out which gnuplot I have than print a warning. This is
essentially what the second patch I proposed does.

[~,s] = system ([gnuplot_binary " -e 'set term' 2>&1 | grep '\\<qt\\> '"]);
if isempty (s)
  putenv ("GNUTERM", "x11");
else
  putenv ("GNUTERM", "qt");
endif

-- 
mike


reply via email to

[Prev in Thread] Current Thread [Next in Thread]