From c6cb95f5b2d722b51a55c19d3552ca419e38f20b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Tue, 3 Jul 2012 12:47:58 +0900 Subject: [PATCH] tests: do not use deprecated gtk+ symbols https://bugzilla.gnome.org/show_bug.cgi?id=679301 --- tests/examples/equalizer/demo.c | 15 +++++++++------ tests/examples/spectrum/demo-audiotest.c | 7 ++++--- tests/icles/gdkpixbufsink-test.c | 7 ++++--- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/tests/examples/equalizer/demo.c b/tests/examples/equalizer/demo.c index fe0e513c03..46db870995 100644 --- a/tests/examples/equalizer/demo.c +++ b/tests/examples/equalizer/demo.c @@ -177,7 +177,7 @@ main (int argc, char *argv[]) appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (G_OBJECT (appwindow), "destroy", G_CALLBACK (on_window_destroy), NULL); - vbox = gtk_vbox_new (FALSE, 6); + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); drawingarea = gtk_drawing_area_new (); gtk_widget_set_size_request (drawingarea, spect_bands, spect_height); @@ -185,7 +185,7 @@ main (int argc, char *argv[]) G_CALLBACK (on_configure_event), (gpointer) spectrum); gtk_box_pack_start (GTK_BOX (vbox), drawingarea, TRUE, TRUE, 0); - hbox = gtk_hbox_new (FALSE, 20); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20); for (i = 0; i < NBANDS; i++) { GObject *band; @@ -205,9 +205,10 @@ main (int argc, char *argv[]) frame = gtk_frame_new (label); g_free (label); - scales_hbox = gtk_hbox_new (FALSE, 6); + scales_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); - widget = gtk_vscale_new_with_range (-24.0, 12.0, 0.5); + widget = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + -24.0, 12.0, 0.5); gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE); gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); gtk_range_set_value (GTK_RANGE (widget), gain); @@ -216,7 +217,8 @@ main (int argc, char *argv[]) G_CALLBACK (on_gain_changed), (gpointer) band); gtk_box_pack_start (GTK_BOX (scales_hbox), widget, FALSE, FALSE, 0); - widget = gtk_vscale_new_with_range (0.0, 20000.0, 5.0); + widget = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + 0.0, 20000.0, 5.0); gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE); gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); gtk_range_set_value (GTK_RANGE (widget), bw); @@ -225,7 +227,8 @@ main (int argc, char *argv[]) G_CALLBACK (on_bandwidth_changed), (gpointer) band); gtk_box_pack_start (GTK_BOX (scales_hbox), widget, TRUE, TRUE, 0); - widget = gtk_vscale_new_with_range (20.0, 20000.0, 5.0); + widget = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + 20.0, 20000.0, 5.0); gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE); gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); gtk_range_set_value (GTK_RANGE (widget), freq); diff --git a/tests/examples/spectrum/demo-audiotest.c b/tests/examples/spectrum/demo-audiotest.c index f5e45b90e5..4b5cc00c3a 100644 --- a/tests/examples/spectrum/demo-audiotest.c +++ b/tests/examples/spectrum/demo-audiotest.c @@ -239,9 +239,9 @@ main (int argc, char *argv[]) appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (G_OBJECT (appwindow), "destroy", G_CALLBACK (on_window_destroy), NULL); - vbox = gtk_vbox_new (FALSE, 6); + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); - hbox = gtk_hbox_new (FALSE, 6); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); widget = gtk_check_button_new_with_label ("Fast"); g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (on_fast_slow_mode_changed), (gpointer) spectrum); @@ -251,7 +251,8 @@ main (int argc, char *argv[]) gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - widget = gtk_hscale_new_with_range (50.0, 20000.0, 10); + widget = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 50.0, 20000.0, 10); gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE); gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); gtk_range_set_value (GTK_RANGE (widget), 440.0); diff --git a/tests/icles/gdkpixbufsink-test.c b/tests/icles/gdkpixbufsink-test.c index a09d9f135f..376f67f203 100644 --- a/tests/icles/gdkpixbufsink-test.c +++ b/tests/icles/gdkpixbufsink-test.c @@ -283,14 +283,14 @@ run_gui (const gchar * filename) g_signal_connect (info->win, "delete-event", G_CALLBACK (gtk_main_quit), NULL); - vbox = gtk_vbox_new (FALSE, 6); + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_container_set_border_width (GTK_CONTAINER (vbox), 12); gtk_container_add (GTK_CONTAINER (info->win), vbox); info->img = gtk_image_new (); gtk_box_pack_start (GTK_BOX (vbox), info->img, FALSE, FALSE, 6); - hbox = gtk_hbox_new (FALSE, 6); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 6); info->accurate_cb = gtk_check_button_new_with_label ("accurate seek " @@ -299,7 +299,8 @@ run_gui (const gchar * filename) g_signal_connect (info->accurate_cb, "toggled", G_CALLBACK (accurate_toggled_cb), info); - info->slider = gtk_hscale_new_with_range (0.0, 1.0, 0.001); + info->slider = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0.0, 1.0, 0.001); gtk_box_pack_start (GTK_BOX (vbox), info->slider, FALSE, FALSE, 6); g_signal_connect (info->slider, "value-changed", G_CALLBACK (slider_cb), info);