[haiku-development] Re: [RFC] Getting rid of the tabs in Terminal, using Stack & Tile instead

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 26 Jul 2015 21:32:19 +0200

On 26.07.2015 09:46, Adrien Destugues wrote:

On Sat, Jul 25, 2015 at 05:47:43PM -0400, gus knight wrote:
Currently, the Terminal app's code is a really big mess. Part of the
reason for this is because of the way the tabs/sessions are managed.

Could you elaborate? It's been a while since I worked on Terminal and mostly on other parts, but I don't recall the tab management code being too bad.

Cleaning it up is possible, but I think the better solution would be
to scrap the BTabView altogether and switch to using Stack & Tile for
the tabs instead. That way, when you hit "New tab" in the menu, it
opens a new window and attaches it to the current stack.

Thoughts? Comments? Objections?

That would be nice for the following reasons:
* Get rid of the limitation to 6 tabs

That limit is completely arbitrary [1] and could be increased without effort. I suppose the reason why it exists at all is that our BTabView doesn't have a way to deal with a situation when there are more tabs than fit the available horizontal space (like scrolling or "paging" to show out-of-range tabs (I would avoid Windows style multi-row tabs)).

As you list in the drawbacks, window tabs need even more space. Which would make the situation only worse. And while there are obvious solutions for the BTabView -- one of which should be implemented anyway -- ATM there's no need for a solution for window tabs.

* No more accidentally closing a tab by middle clicking it when trying
to paste something in the terminal

I guess, you need to practice aiming. ;-) Given that Terminal closes the tab without alert only when the shell is the foreground process, the damage in such a case is usually limited, anyway.

A more general concern I have is that switching from in-window tabs to stacked windows has very little advantages in itself (saving a fairly small amount of screen estate being the only one really), but it breaks a certain work-flow: stacking windows which themselves have tabs. Admittedly I've never used it with Terminal, but with web browser windows (for which the idea of switching from a tab view to stacked windows has been proposed in the past as well) I find it simply awesome. E.g. the six Firefox windows -- each with plenty of tabs -- which currently clutter two of my KDE desktops (aka workspaces), I would very neatly organize on a single workspace on Haiku.

CU, Ingo

[1] http://cgit.haiku-os.org/haiku/tree/src/apps/terminal/TermWindow.cpp?id=209cd3dd4fa80d0096cc77f8effa2116eb1e38f8#n66


Other related posts: