Re: powershell/gnome-terminal



On Sun, 23 Jan 2000, Miles Lane wrote:

[snippage]

> Yes, I suppose that the UI could work that way: the UI shown
> for the first window would look like the non-tab UI.  On the
> other hand, this might confuse users.  
> 
> Could the tabbed UI be done in such a way that executing
> gnome-terminal doesn't necessarily spawn a new program window?  

Yes.

> Specifically, I suppose that when a gnome-terminal is launched, 
> it could check to see whether the "tab" option is enabled, then 
> check for a currently running gnome-terminal instance.  If so, 
> it could send a signal to that program instance to open another 
> terminal tab.  Then the second instance of gnome-terminal could 
> exit without ever displaying a window.  Perhaps this could be 
> done by making most of the program a module that gets loaded if 
> a new window needs to be displayed.  Then the "gnome-terminal" 
> executable could be a tiny stub program that checks for the 
> tab option setting and a pre-existing gnome-terminal process
> before loading the more program module and displaying a window.
> 

To accurately and efficiently implement tabs all of the gnome-terminals
need to be in the same process.  This is the same behavior that you get
when you select File->New Terminal from the menu.  That action dosen't
start a new process it just creates a new gnome-terminal window that runs
in the same process.  If all of the terminals are running from the same
process it is quite trivial to support tabs and the regular terminal
features.


> One cool way "tabbed" and "non-tabbed" mode switching might be 
> done would be to have all opened standalone gnome-terminal windows
> collapse into a single window when the tabs option is enabled
> and the options dialog is closed.

I think it would be better to allow a user to select the terminals to be
"swallowed" into the tabbed terminal window.  The tabbed terminal window
could also "regurgitate" the "swallowed" terminal windows if selected to.
But to make this all happen all of the terminals need to be running in the
same gnome-terminal process, or some CORBA work needs to be done to
support it.  

>  A new gnome-terminal window
> would be displayed and then as each of the open gnome-terminal 
> windows gets "absorbed" a new would disappear.  The label on 
> each terminal's tab could be the text that was displayed on the
> standalone window's titlebar.  There might be other good ways
> of implementing this mode-switching UI.
> 
> The absorbing might be down by passing state information to the
> new "tab enabled" process.  The state would consist window text.
> 
> One tricky bit would be mode-switching when the separate 
> currently running gnome-terminal instances have different 
> options selected (text/background colors, transparency,
> background image and so on).  

Its not hard at all.  

> I suppose it's doable.  Each
> tab display could have separate display characteristics.
> That might be a bit confusing from a usability standpoint,
> though.
> 
> Any other thoughts?

Well, after reading some of your requests I did hack up an initial
implementation after one night.  The hack that I did do currently does
these things:

	* Support tabbed gnome-terminal

	* Support old style behavior

	* Allows seperate configuration (via the same menu as always) for
tabbed and normal terminal modes.  The trick with this is when you set the
preferences for a terminal, you are setting the prefs for the terminal
that is selected via tabs or in normal mode.

You can see a quite plain screenshot demonstrating this here:

http://www.cs.montana.edu/~cconover/tabbed.gif

Now, this patch isn't yet ready for general consumption, but I will be
putting a little bit of time into it.  The things I still have to make
work are:

	* Adding a cleaner tab "mode" selection, curently you have to hit
file "New tabbed terminal".

	* Allow tabbed terminals be moved between terminal windows running
in the same g-t process

	* Implement "swallowing" and "regurgitation" of terminals.

	* Allow setting of the tabbed terminals titles (telsa) 

	* Add keybinding ability to change tabs like CTRL-A (telsa again)

	* Add support to session save/load to have tab settings to be
restored.

	* Add configuration options to allow positioning of tabs (left,
top, right, bottom).

I'm not sure if all of this is going to get into the mainstream
gnome-terminal since I'm not a maintainer of it.  But when these additions
progress to a useful state I will send the patch to the maintainers for
their review.

If you have any other ideas or questions please feel free to contact me.

Rusty 

-- 
Rusty Conover        | rusty@zootweb.com 
Systems Programmer   | 406-586-5050 x242
Zoot Enterprises     | http://www.zootweb.com  




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