diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2013-02-01 17:03:44 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-02-01 22:58:53 -0500 |
commit | 9efa28591cc49c33e8fb6a66a5e888c57b9b3b3f (patch) | |
tree | 2a44cf586702056d43f24bdcf399c3565b7e31e0 /gtk/gtkviewport.c | |
parent | 5f41eb74a5fefc194b18c8dc62202b86740fd22f (diff) | |
download | gtk+-9efa28591cc49c33e8fb6a66a5e888c57b9b3b3f.tar.gz |
scrolledwindow: make gtk_scrolled_window_add() smart
There's really no reason why we shouldn't automatically create a
GtkViewport when the widget added to GtkScrolledWindow is not a
GtkScrollable, instead of just printing a g_warning.
Copy the viewport special case into the scrolled window implementation
of gtk_container_add().
https://bugzilla.gnome.org/show_bug.cgi?id=693015
Diffstat (limited to 'gtk/gtkviewport.c')
-rw-r--r-- | gtk/gtkviewport.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index a80e811dcb..e82d70baee 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -49,8 +49,9 @@ * #GtkTreeView or #GtkIconView, it can be added to a #GtkScrolledWindow * with gtk_container_add(). If a widget does not, you must first add the * widget to a #GtkViewport, then add the viewport to the scrolled window. - * The convenience function gtk_scrolled_window_add_with_viewport() does - * exactly this, so you can ignore the presence of the viewport. + * gtk_container_add() does this automatically if a child that does not + * implement #GtkScrollable is added to a #GtkScrolledWindow, so you can + * ignore the presence of the viewport. * * The #GtkViewport will start scrolling content only if allocated less * than the child widget's minimum size in a given orientation. |