|
From: Petr M. <mi...@ph...> - 2004-10-04 06:42:17
|
> >That's part of something that Petr added in Dec 2003.
> >I don't understand what it's for, even after reading the code and
> >the comments.
> >
> >(And what is a "multitab console" anyhow? I use KDE on all my
> >machines, but I have no idea what piece or feature of the KDE
> >desktop this code affects).
Mozilla, Konqueror, Konsole can have several sessions open simultaneously as
"tabs" in one window. For KDE Konsole, a tab is one window shell or shell
session.
See gplt_x11.c:
static char*
getMultiTabConsoleSwitchCommand(unsigned long *newGnuplotXID)
which says:
* Currently implemented for:
* - KDE's Konsole.
...
/* now test for GNOME multitab console */
/* ... if somebody bothers to implement it ... */
...
What it does:
1. Konsole session 1: run gnuplot, "plot x"
2. Open/switch to another session
3. Hit "Space" in gnuplot's X11 => gnuplot sends focus to the correct
konsole and browses it to the appropriate session
I think that GNOME has also multitab consoles -- that could be useful if
someones adds the same functionality there.
> Or, if the code should just check for the command once, under the
> assumption that if it tries again it'll just get the same thing, then:
>
> if (!cmd_tried) {
> cmd = getMultiTabConsoleSwitchCommand(&newGnuplotXID);
> cmd_tried = 1; /* or TRUE, or something */
> }
That's the correct fix, I've just cvs'ed it.
Petr
|