Simplified tabbing support in Gtk+

3:25 pm GNOME, General

There has been a couple of posts recently on Planet GNOME mention the increase usage of tabs in applications. I decided to write up a quick patch for GTK+ which makes it even easier to add tab support. With the patch I applied you can just call a single method:

gtk_widget_set_use_tabs (widget, TRUE);

To get complete tab support in your application.

Emmanuele just reviewed it and it will soon be committed to SVN trunk of GTK+. I’m looking forward to applications migrating to this new simplified API!

15 Responses

  1. makkara Says:

    Better would be to commit a patch that removes all tab support.

  2. knipknap Says:

    Yay, tabbed buttons!

  3. Nicolas Says:

    I think there’s something wrong in hunk @@ -2512,6 +2530,9 @@ of gtk/gtkwidget.c: shouldn’t the call be gtk_widget_set_use_tabs (widget, g_value_get_boolean (value));
    ie widget instead of value as first parameter?

    ;-)

  4. GNOME 3.0 = Tabs! — Cosimo’s blog. Says:

    [...] it seems that GTK+ will help us by providing a cool API for that, so let’s just make it [...]

  5. J5’s Blog » D-Bus now supports tabs Says:

    [...] right, in order to support the upcomming release of GNOME 3.0 which is introducing a new tabbed interface, we’ve totally made D-Bus HIG compliant by adding tabs to the API.  No longer do you have to [...]

  6. Nação Livre » Blog Archive » Tabs everywhere ? Please, no! Says:

    [...] outro post aqui e outro aqui, ambos muito engraçados. O primeiro fala sobre o gnome-panel usar abas, o segundo propõe um [...]

  7. pvanhoof Says:

    You are not adding widget back to parent if tabbed is true, I think you want something to put widget back in parent .

    I might be wrong, maybe it’s wanted behaviour ? :)

  8. pvanhoof Says:

    s/to put widget back/to put the notebook/

  9. Andy Wingo Says:

    This is hilarious, Johan van Swederson.

  10. Vadim P. Says:

    Awesome fad. Bet KDE won’t have this!

  11. Jones Lee Says:

    It’s good to have GTK+ Tab support. But then please, app developers, please do not abuse the use of Tabs.

  12. Mike Says:

    Clearly we need to be adding tab support to Metacity (a la Fluxbox) so even poor, tab deficient applications can behave in a tabbed manner ;).

  13. aaa Says:

    i’m with comment #12 ‘Mike’ on this one and i up the bidding by asking a tiling wm as a side dish to the tabbed wm

    now _that_ would be a trully spatial desktop

  14. johan Says:

    Jonas: Don’t worry, all this tab hysteria is actually just a joke.

  15. PCMan Says:

    This patch won’t work.
    1. You forgot to add the notebook to parent widget.
    2. What happens when you need the second notebook page?

    I think this is just a joke since this is not a working patch.