small fix for "Paned Window Widgets" example

2008-12-28  Ryan Lortie  <desrt@desrt.ca>

        small fix for "Paned Window Widgets" example

        * docs/tutorial/gtk-tut.sgml: use gtk_container_add rather than 
        add_with_viewport for putting a GtkTreeView into a ScrolledWindow

        Spotted by Benjamin Herrenschmidt


svn path=/trunk/; revision=21958
This commit is contained in:
Ryan Lortie 2008-12-29 01:00:42 +00:00 committed by Ryan Lortie
parent 3c906f8616
commit 8250998da8
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2008-12-28 Ryan Lortie <desrt@desrt.ca>
small fix for "Paned Window Widgets" example
* docs/tutorial/gtk-tut.sgml: use gtk_container_add rather than
add_with_viewport for putting a GtkTreeView into a ScrolledWindow
Spotted by Benjamin Herrenschmidt
2008-12-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimmodule.c:

View File

@ -6932,8 +6932,7 @@ static GtkWidget *create_list( void )
model = gtk_list_store_new (1, G_TYPE_STRING);
tree_view = gtk_tree_view_new ();
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window),
tree_view);
gtk_container_add (GTK_CONTAINER (scrolled_window), tree_view);
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), GTK_TREE_MODEL (model));
gtk_widget_show (tree_view);