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 601412 - action area presence makes gnome-terminal window grow on tab switch
action area presence makes gnome-terminal window grow on tab switch
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 116650 138020
 
 
Reported: 2009-11-10 15:00 UTC by Christian Persch
Modified: 2010-01-18 06:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Show the action widgets correctly (1.24 KB, patch)
2009-12-02 10:51 UTC, Johannes Schmid
none Details | Review
Don't grow width when adding new tabs with action widgets (1.34 KB, patch)
2009-12-02 10:53 UTC, Johannes Schmid
none Details | Review

Description Christian Persch 2009-11-10 15:00:23 UTC
Steps to repro:
0) In gnome-terminal/src/terminal-window.c:terminal_window_init(), insert this code directly after the "priv->notebook = gtk_notebook_new ();" line:

  {
    GtkWidget *h = gtk_hbox_new (FALSE, 6);
    gtk_box_pack_start (GTK_BOX (h), gtk_button_new_with_label ("hi there!"), FALSE, FALSE, 0);
    gtk_widget_show_all (h);
    gtk_notebook_set_action_widget (GTK_NOTEBOOK (priv->notebook), h, GTK_PACK_START);
  }

1) Compile, run
2) Create a 2nd tab
3) Switch back and forth between the tabs

Results:
a) The action area where the button should be is allocated space, but the button is not shown
b) On each tab switch, the window grows in the horizontal direction!
Comment 1 Matthias Clasen 2009-11-29 23:11:41 UTC
Johannes, this seems to be action-area fallout. Can you take a look at this ?
Comment 2 Johannes Schmid 2009-12-02 09:20:36 UTC
Hmm, yes, kind of strange things happen here.
Comment 3 Johannes Schmid 2009-12-02 10:51:33 UTC
Created attachment 148892 [details] [review]
Show the action widgets correctly

Would be nice if someone could look into this mapping thing - I am not so sure...
Comment 4 Johannes Schmid 2009-12-02 10:53:07 UTC
Created attachment 148893 [details] [review]
Don't grow width when adding new tabs with action widgets

With the two patches, the given test-case with gnome-terminal works for me correctly. GtkNotebook grows 4 pixels in width though when showing tabs but that's unrelated to action widgets (it happens also with 2.18).