[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 20:41:38 -0400 |
On Mon, Sep 24, 2012 at 8:37 AM, Ben Abbott wrote:
>
> On Sep 24, 2012, at 8:15 AM, Mike Miller wrote:
>
>> 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.
>
> ok. I was under the impression that the warning coincided with a plot, but
> it actually occurs when gnuplot is run, correct?
>
>> 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.
>
> Any reason not to call __gnuplot_has_terminal__ in octave-gui.cc before
> setting GNUTERM? This can be done using feval(). I don't see this in our
> docs, but I thought it used to be part of OctaveForge (I don't see it there
> anymore). I did find a description at the link below.
>
> http://www.pt.xemacs.org/wiki.pl?CodaStandalone
>
> I may have something wrong, but the untested code below illustrates the idea.
>
> octave_value_list functionArguments;
> functionArguments(0) = "qt";
> const octave_value_list have_qt = feval ("__gnuplot_has_terminal__",
> functionArguments, 1);
Yeah, I have 3 reasons why this won't work:
1. It doesn't work :) The interpreter hasn't started up yet at this
point in the code so feval is a no-go.
2. The octave_start_gui function is pretty small and simple and this
adds special-purpose clutter.
3. It's easier to maintain if we keep gnuplot-related changes together.
I've started work on a changeset to add a function so the interpreter
can tell whether the GUI is running
(https://savannah.gnu.org/patch/index.php?7851). Once this is in
place, I think we can move all of this logic into gnuplot_default_term
(in __gnuplot_drawnow__.m).
--
mike
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Daniel J Sebald, 2012/09/22
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Ben Abbott, 2012/09/22
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Mike Miller, 2012/09/22
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Daniel J Sebald, 2012/09/23
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Ben Abbott, 2012/09/23
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Daniel J Sebald, 2012/09/23
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Ben Abbott, 2012/09/23
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Ben Abbott, 2012/09/23
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Mike Miller, 2012/09/24
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Ben Abbott, 2012/09/24
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable,
Mike Miller <=
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Michael D. Godfrey, 2012/09/24
- Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Daniel J Sebald, 2012/09/24
Re: [patch #7847] Make gnuplot Qt terminal default for GUI/IDE via environment variable, Daniel J Sebald, 2012/09/23