tests: do not use deprecated gtk+ symbols

https://bugzilla.gnome.org/show_bug.cgi?id=679301
This commit is contained in:
Javier Jardón 2012-07-03 12:47:58 +09:00 committed by Tim-Philipp Müller
parent 9822ebb0b0
commit c6cb95f5b2
3 changed files with 17 additions and 12 deletions

View file

@ -177,7 +177,7 @@ main (int argc, char *argv[])
appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (G_OBJECT (appwindow), "destroy", g_signal_connect (G_OBJECT (appwindow), "destroy",
G_CALLBACK (on_window_destroy), NULL); 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 (); drawingarea = gtk_drawing_area_new ();
gtk_widget_set_size_request (drawingarea, spect_bands, spect_height); 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); G_CALLBACK (on_configure_event), (gpointer) spectrum);
gtk_box_pack_start (GTK_BOX (vbox), drawingarea, TRUE, TRUE, 0); 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++) { for (i = 0; i < NBANDS; i++) {
GObject *band; GObject *band;
@ -205,9 +205,10 @@ main (int argc, char *argv[])
frame = gtk_frame_new (label); frame = gtk_frame_new (label);
g_free (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_draw_value (GTK_SCALE (widget), TRUE);
gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
gtk_range_set_value (GTK_RANGE (widget), gain); gtk_range_set_value (GTK_RANGE (widget), gain);
@ -216,7 +217,8 @@ main (int argc, char *argv[])
G_CALLBACK (on_gain_changed), (gpointer) band); G_CALLBACK (on_gain_changed), (gpointer) band);
gtk_box_pack_start (GTK_BOX (scales_hbox), widget, FALSE, FALSE, 0); 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_draw_value (GTK_SCALE (widget), TRUE);
gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
gtk_range_set_value (GTK_RANGE (widget), bw); gtk_range_set_value (GTK_RANGE (widget), bw);
@ -225,7 +227,8 @@ main (int argc, char *argv[])
G_CALLBACK (on_bandwidth_changed), (gpointer) band); G_CALLBACK (on_bandwidth_changed), (gpointer) band);
gtk_box_pack_start (GTK_BOX (scales_hbox), widget, TRUE, TRUE, 0); 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_draw_value (GTK_SCALE (widget), TRUE);
gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
gtk_range_set_value (GTK_RANGE (widget), freq); gtk_range_set_value (GTK_RANGE (widget), freq);

View file

@ -239,9 +239,9 @@ main (int argc, char *argv[])
appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (G_OBJECT (appwindow), "destroy", g_signal_connect (G_OBJECT (appwindow), "destroy",
G_CALLBACK (on_window_destroy), NULL); 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"); widget = gtk_check_button_new_with_label ("Fast");
g_signal_connect (G_OBJECT (widget), "toggled", g_signal_connect (G_OBJECT (widget), "toggled",
G_CALLBACK (on_fast_slow_mode_changed), (gpointer) spectrum); 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); 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_draw_value (GTK_SCALE (widget), TRUE);
gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP); gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
gtk_range_set_value (GTK_RANGE (widget), 440.0); gtk_range_set_value (GTK_RANGE (widget), 440.0);

View file

@ -283,14 +283,14 @@ run_gui (const gchar * filename)
g_signal_connect (info->win, "delete-event", G_CALLBACK (gtk_main_quit), g_signal_connect (info->win, "delete-event", G_CALLBACK (gtk_main_quit),
NULL); 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_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (info->win), vbox); gtk_container_add (GTK_CONTAINER (info->win), vbox);
info->img = gtk_image_new (); info->img = gtk_image_new ();
gtk_box_pack_start (GTK_BOX (vbox), info->img, FALSE, FALSE, 6); 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); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 6);
info->accurate_cb = gtk_check_button_new_with_label ("accurate seek " 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_signal_connect (info->accurate_cb, "toggled",
G_CALLBACK (accurate_toggled_cb), info); 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); gtk_box_pack_start (GTK_BOX (vbox), info->slider, FALSE, FALSE, 6);
g_signal_connect (info->slider, "value-changed", g_signal_connect (info->slider, "value-changed",
G_CALLBACK (slider_cb), info); G_CALLBACK (slider_cb), info);