After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 78776 - Show tabs even when only 1 exists
Show tabs even when only 1 exists
Status: RESOLVED DUPLICATE of bug 613642
Product: gnome-terminal
Classification: Core
Component: general
unspecified
Other other
: Normal enhancement
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 87293 92642 115618 120732 133757 383913 514757 570026 679140 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-04-15 16:30 UTC by Steve Fox
Modified: 2015-07-14 17:43 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Implementation for always show tabs (3.35 KB, patch)
2004-10-01 19:36 UTC, Javier Donaire
none Details | Review
Javier Donaire's patch - updated. (4.04 KB, patch)
2005-02-08 12:29 UTC, Rune Nesheim
none Details | Review
Javier Donaire's patch - updated against current cvs (3.97 KB, patch)
2006-01-18 13:26 UTC, Mario Manno
needs-work Details | Review
Fix growth of window due to tab bar disappearance (853 bytes, patch)
2006-05-14 20:15 UTC, Eric Anderson
none Details | Review
updated patch based on bug 75420 (7.92 KB, patch)
2008-10-09 23:56 UTC, Mario Manno
needs-work Details | Review
implement gconf setting to always show tabs (7.69 KB, patch)
2009-05-27 16:49 UTC, Mario Manno
reviewed Details | Review

Description Steve Fox 2002-04-15 16:30:09 UTC
Using gnome-terminal 1.9.2. When I add a second tab to it, it resizes the
window to make up for the space to draw the tabs. It resizes the window
downward which is awkward because it then goes below my panel. It would be
very nice if gnome-terminal would resize the zvt widget to compensate for
the loss of space in the gnome-terminal window. Same problem applies when
closing all other tabs...gnome-terminal should grow back. It's annoying for
users to have to resize their windows when tabs come and go.

Thanks!
Comment 1 Havoc Pennington 2002-04-24 03:50:36 UTC
The current behavior is that adding tabs maintains the fact that 
the terminal is 80x24 (say) if it had that size before. I think this 
is really right, just as we maintain the grid size if you change 
the font...

So I guess the current way is intentional. If a lot of people think
it's a bug we could consider changing it, but I'd want to hear more
rationale etc. and maybe some UI team input.
Comment 2 Steve Fox 2002-04-24 04:57:05 UTC
Personally, I would definitely rather have my terminal size shrink
than to have to resize windows all the time. It's much easier to
Shift+PgUp if something scrolled off the screen than it is to have to
grab your mouse and drag the window up because the bottom of the
terminal is now below your panel.

I'll post the bug to the usability list with a request for comments. 
Comment 3 Calum Benson 2002-05-03 14:04:36 UTC
I guess the simplest solution would be for gnome-terminal to show a
tab even when there's only one terminal open in the window-- then
there would be no need to resize the window when you opened a second
tab.

Admittedly this doesn't make the greatest use of screen real-estate,
though.
Comment 4 Steve Fox 2002-05-03 15:01:24 UTC
I agree that it's probably the best solution. In fact, it's what
Konsole and Multi-Gnome-Terminal have chosen to do. For people who are
real minimalists, couldn't a "don't display tabs if only one tag"
crackpipe option be editable via gconf-editor? Galeon and Mozilla both
implement this style of preferences as "Always show tabs".
Comment 5 Havoc Pennington 2002-05-03 15:19:29 UTC
We could have "hide tabs" just like "hide menubar" I suppose, 
with prefs option "hide tabs by default in new windows."

I sort of like the current behavior though... tabs-when-needed... 

The terminal _could_ pull itself out from under the panel, though 
I think in practice that wouldn't work very well.
Comment 6 Jon Tollefson 2002-06-19 18:12:09 UTC
I find this resizing annoying.  I don't like it any time my
window size changes and I didn't directly change it.  When you have
your window positioned just where you want it it is frustrating to
have it move around.  I have mine positioned at the bottom of the
screen just above the panel, but when a tab is added then the bottom
of the terminal window goes underneath the panel.

I have noticed this same thing happens when I toggle the menubar on/off.
Comment 7 Luis Villa 2002-07-10 19:46:32 UTC
*** Bug 87293 has been marked as a duplicate of this bug. ***
Comment 8 Havoc Pennington 2002-09-22 21:52:45 UTC
I don't think the resizing itself is a bug. Adding/removing the tab 
as you go between 1 tab and > 1 may be.
Comment 9 Havoc Pennington 2002-09-22 22:15:55 UTC
*** Bug 92642 has been marked as a duplicate of this bug. ***
Comment 10 Olav Vitters 2003-06-21 23:28:21 UTC
*** Bug 115618 has been marked as a duplicate of this bug. ***
Comment 11 Mariano Suárez-Alvarez 2003-08-26 15:43:59 UTC
*** Bug 120732 has been marked as a duplicate of this bug. ***
Comment 12 Matthias Warkus 2003-10-12 16:45:44 UTC
Havoc, I don't understand your last comment -- does it mean that "tabs
always on" mode, perhaps with an appropriate exposed or hidden
configuration key "keep tabs hidden in single-tab terminal windows",
would be acceptable?
If yes, I'll try to cobble up a patch, I think this is within my means.
Comment 13 Mariano Suárez-Alvarez 2004-02-09 01:12:36 UTC
*** Bug 133757 has been marked as a duplicate of this bug. ***
Comment 14 Javier Donaire 2004-10-01 19:36:56 UTC
Created attachment 32148 [details] [review]
Implementation for always show tabs

Here is a possible implementation. If the gconf key 
/apps/gnome-terminal/global/always_show_tabs is true, the notebook's tabs are
not hidden if there's only one tab.
Comment 15 Rune Nesheim 2005-02-08 12:29:41 UTC
Created attachment 37157 [details] [review]
Javier Donaire's patch - updated.

Updated Javier Donaire's patch to work with latest CVS version.
Comment 16 Kjartan Maraas 2005-02-08 14:06:59 UTC
Comment on attachment 32148 [details] [review]
Implementation for always show tabs

Obsoleting this since there's an updated patch in.
Comment 17 Johan Walles 2005-07-10 13:20:53 UTC
The original request for resizing the terminal widget rather than the window
when the tabs get displayed is what I'd prefer to see.

Havoc, you said that "If a lot of people think it's a bug we could consider
changing it".  I think this is a bug.  What's "a lot of people"?  What would be
required for the terminal to change behaviour to:
1. Don't show tabs when not needed (i.e. only one terminal in the window).
2. When tabs need to be displayed, shrink the terminal pane, keep the window size.
Comment 18 Kjartan Maraas 2005-08-19 20:38:03 UTC
Will have to wait for the next development cycle now.
Comment 19 Kjartan Maraas 2005-09-25 15:13:36 UTC
I aired this in #gnome-hackers today and it seems most people in that group
don't think this is improvement and the argument is that most people don't use
tabs at all.
Comment 20 Miek Gieben 2006-01-10 13:00:25 UTC
I use tabs and I would like to see some of the improvements mentioned here
find their way into gnome-terminal. Grabbing your mouse while typing in 
gnome-terminal is just to awkward.
Comment 21 Olav Vitters 2006-01-10 13:28:12 UTC
(In reply to comment #20)
> I use tabs and I would like to see some of the improvements mentioned here
> find their way into gnome-terminal. Grabbing your mouse while typing in 
> gnome-terminal is just to awkward.

What is wrong with alt-<number> or ctrl-pgdn/pgup?
Comment 22 Miek Gieben 2006-01-10 14:00:24 UTC
I'm sorry if I wasn't clear: I mean grabbing your mouse to move your terminal
window, because it resized over/under your panel when you add a second
tab.
Comment 23 Mario Manno 2006-01-18 13:26:53 UTC
Created attachment 57588 [details] [review]
Javier Donaire's patch - updated against current cvs

Diff against current cvs.
Comment 24 Miek Gieben 2006-01-19 15:24:43 UTC
Allthough I can live with a "always show tabs option", I hope one can also choose
to automatically resize the terminal window.
Comment 25 Victor Osadci (Vic) 2006-01-20 23:09:51 UTC
(In reply to comment #17)
> 2. When tabs need to be displayed, shrink the terminal pane, keep the window size.

Some ncurses apps don't like it when the terminal is resized. For example 'iptraf' won't resize itself so you lose the bottom row, 'top' kinda borks the terminal at exit.
Fix it for some, break it for others.
Comment 26 Guilherme de Siqueira Pastore 2006-01-21 00:32:15 UTC
Not taking any position on the whole bug, but really, if applications can't deal with resizes, they should be fixed, not limit the others which work adequately.
Comment 27 Eric Anderson 2006-05-14 04:09:29 UTC
I don't understand why this bug is such an issue as to still be open 4 years later...

These are the groups of people I can tell exist:
1. I want my terminals to remain the same size.
   a. Don't show tabs when only one exists. When I have more than one tab,
      increase window size. When I have only one tab again, decrease window
      size.
2. I want my window to remain the same size.
   a. Don't show tabs when only one exists. When I have more than one tab, steal
      window space from the terminal for tab bar. When I have only one tab
      again, return window space back to the terminal.
   b. Always show tabs.

As it stands. The current gnome-terminal (2.14) does none of these. I do not know if this bug has been fixed in 2.15, but it seems not due to the last activity on this bug being before the release of 2.14.

Currently gnome-terminal does this:
    Don't show tabs when only one exists. When I have more than one tab,
    increase window size. When I have only one tab again, give window space to
    terminal.

This satisfies nobody. In addition, the window grows each time the tab bar is added and removed.

The easiest solution is just forget about the entire problem and always show tabs (group 2b). It may be noted that this happens with gedit and Gaim.

The group 2a has a minor flaw. The terminal can only be certain sizes, so the stealing from the terminal will most likely not steal the perfect number of pixels for the tab bar, so the window will loose a few pixels of size. This might now be too bad, but the same will happen when the tab bar goes away. If you felt you should not ever increase the size of the terminal, then every cycle a complete line of the terminal would be lost. If it lost the extra space one way and gained it the other then overall, things would be okay. But all the same, the window size would almost be required to vary, which is exactly what this group does not want. It may be noted that this happens with Epiphany and Liferea.

The group 1a has half of what they want now since the window size increases when a tab bar is added. The only thing that would be done to fix this problem is just remove the space that the title bar is using from the window. So this is very doable.

So there a two opinions that can be chosen (1a and 2b), and neither of them are being used. In addition, they are not mutually exclusive. Also, patches for 2b already exist. I recommend the second part of 1a be fixed.

As an added bonus, you don't have to worry about those ncurses programs. Also, you may notice the the groups would change to "don't waste space" and "don't resize my window".

Or did I completely miss something?

By the way, I am in group 1a. I like xterm, but I like tabs and GNOME (consistency, simplicity, GTK+, Pango, etc).

All in all, choose some reason for the madness. Why does it resize the window when we add the tab bar so that the terminal stays the same, but then give the space to the terminal when it gets rid of the bar? I would be okay with 2a (assuming grow one way and shrink the other so that you don't have the window growing or shrinking over time). It just needs to be consistent.
Comment 28 Behdad Esfahbod 2006-05-14 05:46:30 UTC
Without reading your entire comment, if a bug is open for four years, it just means that nobody cared enough to write a patch.
Comment 29 Eric Anderson 2006-05-14 20:15:16 UTC
Created attachment 65456 [details] [review]
Fix growth of window due to tab bar disappearance

I found out why the bug exists and made a patch. When a tab was removed, it causes a series of recalculation steps, but the window calculation happened before the tab bar was removed. This forces a recalculation after the tab bar is removed.
Comment 30 Eric Anderson 2006-05-14 23:08:00 UTC
I used a GNOME 2.12 machine (Ubuntu) a little while ago and realized that it did not have the problem with the terminal growing. I now think that my problem is a 2.14 bug. So my comments on this bug are nullified but a bug may be opened to address this problem that I described and made a patch for.
Comment 31 Olav Vitters 2006-05-14 23:19:07 UTC
Opening/closing causing an extra row is bug 324426
Comment 32 Mario Manno 2006-08-05 03:21:42 UTC
Just wanted to say that i'm using Javiers patch for like 1.5 years now.

After applying 'Javier Donaire's patch - updated against current cvs' no unintented resizing is happening with gnome-terminal 2.14.2.
Comment 33 Brad Walker 2006-12-15 23:16:02 UTC
disclaimer: I almost always use at least two tabs of screen sessions, one for user and one for root. I think tabs are best used to separate profiles.

I'm in favor of creating a tab toolbar. It would allow gnome-terminal to add enhancements and solve UI issues.

See bug #138020 for a possible enhancement. This tab toolbar button could allow users to easily create tabs of different profiles.

The current tab implementation has UI design issues. For example (bug #383913), reattaching gnome-terminals is cumbersome when attaching a terminal from a single-tab gnome-terminal to another single-tab gnome-terminal. It requires creating an extra tab on each window, dragging the desired tab to the other window, then deleting the two recently-created dummy tabs. A tab toolbar simplifies the matter greatly: simply drag the tab to another gnome-terminal and the zero-tab window disappears.

What about people who don't want to see a a toolbar? Why not give the tab toolbar an auto-hide option like a gnome-panel? This pleases people who want both constant-sized terminals and windows. An auto-hidden tab toolbar could reveal itself when tab hotkeys are pressed and when a tab is dragged over its window from another window. Bonus points for a toolbar transparency option :)
Comment 34 Eric Anderson 2006-12-16 14:20:33 UTC
I like not having the tab bar around when not needed (it makes g-t feel like xterm), but I am almost willing to have the tab bar always on to prevent the window from frequently resizing. If auto-hide does not resize the window, then I would be game for it (it could just expand above the terminal like g-p does over windows).

I do have two concerns though. Being able to hover over the auto-hide tab bar could be very difficult. g-p has the benefit of being on the edge of the screen (as in very easy to mouse over), but g-t will not have this aid in hovering over the tab bar. I can also see it causing a few problems while highlighting things in the terminal.

Of a different note, I am among the many others who wonder why attachment 57588 [details] [review] still has not been committed. It seems to be a very clean patch and isn't long to review. As far as its usefulness, compare it against the menu bar. I NEVER use the menu bar. Since I never use it, I have obviously turned it off. I very frequently use the tab bar, but it still annoys me to have it constantly resizing (as a user, I am the worst case of normally having 1-2 tabs and the second tab being temporary).
Comment 35 Pete Morgan 2007-01-11 23:07:08 UTC
It would be very nice to have the tab bar always there, even with only one tab. (as an option of couse like in firefox)
Comment 36 Jonty Pearson 2007-02-01 22:15:07 UTC
I also think it would be nice to have a "Always show tabs" preference, and it would be consistent with many other gnome programs.
Comment 37 Christian Persch 2008-03-25 21:51:13 UTC
The patches need to be updated to svn trunk.
Comment 38 Christian Persch 2008-05-29 20:33:17 UTC
*** Bug 383913 has been marked as a duplicate of this bug. ***
Comment 39 Christian Persch 2008-06-15 20:30:07 UTC
I cannot reproduce the window growth problem from comment 29 on svn trunk, so I'm setting the patch status to 'obsolete'.
Comment 40 Christian Persch 2008-06-16 13:14:17 UTC
*** Bug 514757 has been marked as a duplicate of this bug. ***
Comment 41 Christian Persch 2008-10-09 13:26:48 UTC
See the latest patch in bug 75420 for how a correct patch for this feature would manage the gconf setting.
Comment 42 Mario Manno 2008-10-09 23:56:19 UTC
Created attachment 120317 [details] [review]
updated patch based on bug 75420
Comment 43 Christian Persch 2009-05-26 20:08:25 UTC
Attachment 120317 [details]:

Minor code style issues:

+  if (!show_tabs)
+  {

Needs to indent the brace 2 spaces more.

+terminal_window_always_show_tabs_notify_cb (TerminalApp *app,
+                                            GParamSpec *pspec,
+                                            TerminalWindow *window)

Should call update_tab_visibility instead of duplicating.

+  gtk_notebook_set_show_border (GTK_NOTEBOOK (priv->notebook), !single || show_tabs);

And move that to update_tab_visibility too.

Comment 44 Mario Manno 2009-05-27 16:49:55 UTC
Created attachment 135450 [details] [review]
implement gconf setting to always show tabs

Please let me know if this needs more work
Comment 45 Christian Persch 2009-06-01 19:49:23 UTC
Looks mostly ok now, a few nits:

+  gtk_notebook_set_show_border (GTK_NOTEBOOK (priv->notebook), show_tabs);

Can't we keep this always set to FALSE ? Due to gtk bug 123408 it will show the border anyway if there's more than 1 tab. (If you keep this, you'll need to add code that unshows the border when the window goes fullscreen, and reshows it when unfullscreening; that won't do anything right now but will once the gtk bug is fixed.)

+terminal_window_always_show_tabs_notify_cb (TerminalApp *app,
+                                            GParamSpec *pspec,
+                                            TerminalWindow *window)
+{
+  TerminalWindowPrivate *priv = window->priv;

Unused var now.

Comment 46 Behdad Esfahbod 2010-03-22 21:29:50 UTC
*** Bug 570026 has been marked as a duplicate of this bug. ***
Comment 47 Christian Persch 2012-08-24 20:38:31 UTC
*** Bug 679140 has been marked as a duplicate of this bug. ***
Comment 48 David Juran 2014-01-29 09:50:54 UTC
One use-case for keeping tabs around, even if there is only a single one is that without it, merging two windows (i.e. making one window a tab of another one) is rather awkward.

I'm running gnome-terminal-3.10.2-1.fc20 on Fedora 20
Comment 49 Anish Sane 2014-01-29 10:19:58 UTC
Another use case:

I use gnome-terminal from an `ssh -x` session. If I add a second tab to a maximized window, the gnome-terminal window expands & goes behind the task bar.

I have to restore the window & maximize it again.
Comment 50 Christian Persch 2015-07-14 17:43:02 UTC
I added a global (dconf only) pref to always show the tab bar, in git master:

$ gsettings set org.gnome.Terminal.Legacy.Settings tab-policy always


The original problem in comment 0 appears to be fixed too, since in gnome-shell the window moves upwards instead of downwards when aligned to the bottom panel (classic mode).

More improvements to this pref are tracked in bug 613642.

*** This bug has been marked as a duplicate of bug 613642 ***