|
From: Daniel J S. <dan...@ie...> - 2003-12-04 20:49:57
|
Ethan Merritt wrote: >On Thursday 04 December 2003 10:31, Petr Mikulik wrote: > > > >>Solution: new command "raise" (abbreviated "ra"). Enclosed is an >>implementation for OS/2 PM and Windows terminals. >> >> > >Your patch calls driver-specific routines directly from the core code >in command.c. Doesn't that break all sorts of things? What if your >current terminal type is something other than the windows or OS2 >terminal? > >I would think such a command would have to be implemented either >as a new driver entry point (term->raise)(win_number), or via a new >option to `set term`. > > > >>Could somebody contribute X11 code? >>Note: proposed is "raise one" command for x11, which would raise just >>that one currently "set term"ed window, instead of all windows. >> >> > >Wouldn't it be better to handle this as in Daniel Sebald's recent patch to >communcate with previously opened X windows? > set term x11 <win#> raise >The command is already accepted by the current syntax and parser. >We just need to force an immediate "raise" event if the window already exists. >I'll have a look - it sounds easy enough. > Ethan, Petr added this code to CVS so you should be able to work from there. I think the "set term ..." approach is better, but there could be some confusion about it. Typing set term x11 100 will change the current plot to 100. But should set term x11 105 raise actually change the current plot number, or should it just raise that plot (if it exists) and not change the current plot? The only thing about the "set term ..." approach is that it is slightly long for doing a raise. Raising is one of those commands that is more useful for fluent use of Gnuplot when there are a lot of plots open and you are working away. So it would nice for such a command to be short. I tend to use the Gnome desktop panel for raising the windows. (The problem is if one starts to get too many plots open it is difficult to remember in which order they came and the plot number never seems to appear in the little panel icon because it is "Gnuplot #" and there is never enough room for the number... The most recent version of Gnome may have fixed this. It seems to place all windows launched from the same process under one selectable menu.) Dan |