[gnome-devel-docs] platform-demos: use gtk_container_add



commit ce91dfd98a28858d807d357c3f854a76509e7f6e
Author: Mohammed Sadik <sadiq sadiqpk org>
Date:   Sat Apr 9 10:14:33 2016 +0530

    platform-demos: use gtk_container_add
    
    gtk_scrolled_window_add_with_viewport is deprecated since 3.8.
    use gtk_container_add instead.

 platform-demos/C/samples/scrolledwindow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/platform-demos/C/samples/scrolledwindow.c b/platform-demos/C/samples/scrolledwindow.c
index d17da52..45d559a 100644
--- a/platform-demos/C/samples/scrolledwindow.c
+++ b/platform-demos/C/samples/scrolledwindow.c
@@ -27,7 +27,7 @@ activate (GtkApplication *app,
   /* Extract our desired image from a file that we have */
   image = gtk_image_new_from_file ("gnome-image.png");
   /* And add it to the scrolled window */
-  gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), image);
+  gtk_container_add (GTK_CONTAINER (scrolled_window), image);
   /* Set the policy of the horizontal and vertical scrollbars to automatic.
    * What this means is that the scrollbars are only present if needed.
    */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]