Fir Gtk 3.8 & newer: gtk_scrolled_window_add_with_viewport() ==> gtk_container_add().
authorBill Meier <wmeier@newsguy.com>
Mon, 4 Mar 2013 19:20:39 +0000 (19:20 -0000)
committerBill Meier <wmeier@newsguy.com>
Mon, 4 Mar 2013 19:20:39 +0000 (19:20 -0000)
svn path=/trunk/; revision=48065

ui/gtk/capture_if_dlg.c
ui/gtk/dfilter_expr_dlg.c
ui/gtk/fileset_dlg.c
ui/gtk/main_welcome.c
ui/gtk/prefs_dlg.c
ui/gtk/rtp_player.c
ui/gtk/summary_dlg.c

index 05aaaef2caa53369486e3896e93b9fe3ce609738..b74471e2437a7847c0d14ed8d1ac7f2444ead6ce 100644 (file)
@@ -668,7 +668,11 @@ capture_if_refresh_if_list(void)
 
   if_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE);
   gtk_container_set_border_width(GTK_CONTAINER(if_vb), 5);
+#if ! GTK_CHECK_VERSION(3,8,0)
   gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(cap_if_sw), if_vb);
+#else
+  gtk_container_add(GTK_CONTAINER(cap_if_sw), if_vb);
+#endif
 
   if_grid = ws_gtk_grid_new();
   ws_gtk_grid_set_row_spacing(GTK_GRID(if_grid), 3);
index e01eb0b9e19d7f9ed7867bd34edc8f60330c05b6..4b12320636e5b846de80b3bbc072e97ced73992c 100644 (file)
@@ -1072,8 +1072,13 @@ dfilter_expr_dlg_new(GtkWidget *filter_te)
                    "changed", G_CALLBACK(relation_list_sel_cb), NULL);
     l_sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(value_list));
     gtk_tree_selection_set_mode(l_sel, GTK_SELECTION_SINGLE);
+#if ! GTK_CHECK_VERSION(3,8,0)
     gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(value_list_scrolled_win),
                                           value_list);
+#else
+    gtk_container_add(GTK_CONTAINER(value_list_scrolled_win),
+                                          value_list);
+#endif
     /* This remains hidden until an enumerated field is selected */
 
     /*
index e2178a056582c4952faee6a02363addf3e6502b0..c61a244a15a75e5eb1a10bb57b13c3fa57372f12 100644 (file)
@@ -304,7 +304,11 @@ fileset_cb(GtkWidget *w _U_, gpointer d _U_)
 
     /* add a dummy container, so we can replace the table later */
     fs_grid_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE);
+#if ! GTK_CHECK_VERSION(3,8,0)
     gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(fs_sw), fs_grid_vb);
+#else
+    gtk_container_add(GTK_CONTAINER(fs_sw), fs_grid_vb);
+#endif
 
     fs_dir_lb = gtk_label_new("");
     gtk_box_pack_start(GTK_BOX(main_vb), fs_dir_lb, FALSE, FALSE, 0);
index a4aced244d74b13a3bdfa6e1d0e3b7866bf84f9d..cc76a1264b000c3b7ecb6794677a794b6259b747 100644 (file)
@@ -185,8 +185,11 @@ scroll_box_dynamic_add(GtkWidget *parent_box)
         /* move child_box from parent_box into scrolled window */
         g_object_ref(child_box);
         gtk_container_remove(GTK_CONTAINER(parent_box), child_box);
-        gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw),
-                                              child_box);
+#if ! GTK_CHECK_VERSION(3,8,0)
+        gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw), child_box);
+#else
+        gtk_container_add(GTK_CONTAINER(scrollw), child_box);
+#endif
         gtk_widget_show_all(scrollw);
     }
 
@@ -1401,8 +1404,11 @@ welcome_new(void)
     /* the end */
     gtk_widget_show_all(welcome_eb);
 
-    gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(welcome_scrollw),
-                                          welcome_eb);
+#if ! GTK_CHECK_VERSION(3,8,0)
+    gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(welcome_scrollw), welcome_eb);
+#else
+    gtk_container_add(GTK_CONTAINER(welcome_scrollw), welcome_eb);
+#endif
     gtk_widget_show_all(welcome_scrollw);
 
 #if GLIB_CHECK_VERSION(2,31,0)
index 29c3e5ca170318d6f300cff65a7c11662457baae..39ea01cf806ed7a9a0e56d12747fe526e8b22029 100644 (file)
@@ -294,7 +294,11 @@ prefs_nb_page_add(GtkWidget *notebook, const gchar *title _U_, GtkWidget *page,
   frame = gtk_frame_new(NULL);
   gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_NONE);
   gtk_container_set_border_width(GTK_CONTAINER(frame), DLG_OUTER_MARGIN);
+#if ! GTK_CHECK_VERSION(3,8,0)
   gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), frame);
+#else
+  gtk_container_add(GTK_CONTAINER(sw), frame);
+#endif
   gtk_widget_show(frame);
 
   if (page) {
@@ -393,7 +397,11 @@ module_prefs_show(module_t *module, gpointer user_data)
   frame = gtk_frame_new(NULL);
   gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_NONE);
   gtk_container_set_border_width(GTK_CONTAINER(frame), DLG_OUTER_MARGIN);
+#if ! GTK_CHECK_VERSION(3,8,0)
   gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(main_sw), frame);
+#else
+  gtk_container_add(GTK_CONTAINER(main_sw), frame);
+#endif
   g_object_set_data(G_OBJECT(main_sw), E_PAGESW_FRAME_KEY, frame);
 
   /* Main vertical box */
index 610de8dc1b3093d2fd1c9cc93b14ff0088113643..06a45eebc73ef9469d68b5851e3db0e5d63c8c43 100644 (file)
@@ -2361,7 +2361,11 @@ rtp_player_dlg_create(void)
 
        channels_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE);
        gtk_container_set_border_width (GTK_CONTAINER (channels_vb), 2);
-       gtk_scrolled_window_add_with_viewport((GtkScrolledWindow *) main_scrolled_window, channels_vb);
+#if ! GTK_CHECK_VERSION(3,8,0)
+       gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW (main_scrolled_window), channels_vb);
+#else
+       gtk_container_add((GTK_CONTAINER (main_scrolled_window), channels_vb);
+#endif
 
        timestamp_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0, FALSE);
        gtk_box_pack_start(GTK_BOX(main_vb), timestamp_hb, FALSE, FALSE, 0);
index a0036cbb742d4c8b63a15631c0e1feac4659833d..7a32c15805593de5f98c857c61b5e0d8d9404ac9 100644 (file)
@@ -240,7 +240,11 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_)
   /* Container for each row of widgets */
   main_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 12, FALSE);
   gtk_container_set_border_width(GTK_CONTAINER(main_vb), 12);
+#if ! GTK_CHECK_VERSION(3,8,0)
   gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window), main_vb);
+#else
+  gtk_container_add(GTK_CONTAINER(scrolled_window), main_vb);
+#endif
 
   /* grid */
   grid = ws_gtk_grid_new();