[gitg: 33/36] Don't use gtk_scrolled_window_add_with_viewport()



commit fefe93f1d0e8e09528030153eed0b4f2db88f7a6
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Feb 14 15:06:15 2013 +0100

    Don't use gtk_scrolled_window_add_with_viewport()
    
    It has recently been deprecated in favor of gtk_container_add().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693798

 egg-list-box.c     |    3 +--
 test-scrolled.vala |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/egg-list-box.c b/egg-list-box.c
index aa6d389..8e0d8a9 100644
--- a/egg-list-box.c
+++ b/egg-list-box.c
@@ -555,8 +555,7 @@ egg_list_box_add_to_scrolled (EggListBox *list_box,
   g_return_if_fail (list_box != NULL);
   g_return_if_fail (scrolled != NULL);
 
-  gtk_scrolled_window_add_with_viewport (scrolled,
-                                        GTK_WIDGET (list_box));
+  gtk_container_add (GTK_CONTAINER (scrolled), GTK_WIDGET (list_box));
   egg_list_box_set_adjustment (list_box,
                               gtk_scrolled_window_get_vadjustment (scrolled));
 }
diff --git a/test-scrolled.vala b/test-scrolled.vala
index 994e554..1044ed2 100644
--- a/test-scrolled.vala
+++ b/test-scrolled.vala
@@ -61,7 +61,7 @@ main (string[] args) {
   hbox.add (scrolled);
 
   var scrolled_box = new Box(Orientation.VERTICAL, 0);
-  scrolled.add_with_viewport (scrolled_box);
+  scrolled.add (scrolled_box);
 
   var label = new Label ("This is \na LABEL\nwith rows");
   scrolled_box.add (label);


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