From: Bastien Nocera Date: Tue, 11 Jan 2011 14:41:53 +0000 (+0000) Subject: examples: allow building with newer GTK+ X-Git-Tag: 1.19.3~511^2~6555^2~1218 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=74375d258e0e626e6e3f37cbd20220454267f07a;p=platform%2Fupstream%2Fgstreamer.git examples: allow building with newer GTK+ GtkFunction is gone, and there's no update policies for GtkRanges any more (but the default was continuous anyway, so no need to set it to that mode explicitly). https://bugzilla.gnome.org/show_bug.cgi?id=639215 --- diff --git a/tests/examples/seek/jsseek.c b/tests/examples/seek/jsseek.c index fcff009..d12840b 100644 --- a/tests/examples/seek/jsseek.c +++ b/tests/examples/seek/jsseek.c @@ -1408,7 +1408,7 @@ set_update_fill (gboolean active) if (active) { if (fill_id == 0) { fill_id = - g_timeout_add (FILL_INTERVAL, (GtkFunction) update_fill, pipeline); + g_timeout_add (FILL_INTERVAL, (GSourceFunc) update_fill, pipeline); } } else { if (fill_id) { @@ -1427,7 +1427,7 @@ set_update_scale (gboolean active) if (active) { if (update_id == 0) { update_id = - g_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline); + g_timeout_add (UPDATE_INTERVAL, (GSourceFunc) update_scale, pipeline); } } else { if (update_id) { @@ -2841,8 +2841,6 @@ main (int argc, char **argv) shuttle_hscale = gtk_hscale_new (shuttle_adjustment); gtk_scale_set_digits (GTK_SCALE (shuttle_hscale), 2); gtk_scale_set_value_pos (GTK_SCALE (shuttle_hscale), GTK_POS_TOP); - gtk_range_set_update_policy (GTK_RANGE (shuttle_hscale), - GTK_UPDATE_CONTINUOUS); g_signal_connect (shuttle_hscale, "value_changed", G_CALLBACK (shuttle_value_changed), pipeline); g_signal_connect (shuttle_hscale, "format_value", @@ -2861,7 +2859,6 @@ main (int argc, char **argv) gtk_scale_set_value_pos (GTK_SCALE (hscale), GTK_POS_RIGHT); gtk_range_set_show_fill_level (GTK_RANGE (hscale), TRUE); gtk_range_set_fill_level (GTK_RANGE (hscale), 100.0); - gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS); g_signal_connect (hscale, "button_press_event", G_CALLBACK (start_seek), pipeline); diff --git a/tests/examples/seek/scrubby.c b/tests/examples/seek/scrubby.c index aa6b358..c9a02f4 100644 --- a/tests/examples/seek/scrubby.c +++ b/tests/examples/seek/scrubby.c @@ -314,7 +314,7 @@ static gboolean stop_seek (GtkWidget * widget, gpointer user_data) { update_id = - g_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline); + g_timeout_add (UPDATE_INTERVAL, (GSourceFunc) update_scale, pipeline); GST_DEBUG ("stop seek"); @@ -340,7 +340,7 @@ play_cb (GtkButton * button, gpointer data) gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE); gst_element_set_state (pipeline, GST_STATE_PLAYING); update_id = - g_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline); + g_timeout_add (UPDATE_INTERVAL, (GSourceFunc) update_scale, pipeline); } } @@ -507,13 +507,11 @@ main (int argc, char **argv) 1.0, 1.0)); hscale = gtk_hscale_new (adjustment); gtk_scale_set_digits (GTK_SCALE (hscale), 2); - gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS); sadjustment = GTK_ADJUSTMENT (gtk_adjustment_new (1.0, 0.0, 5.0, 0.1, 1.0, 0.0)); shscale = gtk_hscale_new (sadjustment); gtk_scale_set_digits (GTK_SCALE (shscale), 2); - gtk_range_set_update_policy (GTK_RANGE (shscale), GTK_UPDATE_CONTINUOUS); schanged_id = g_signal_connect (shscale, "value_changed", G_CALLBACK (speed_cb), diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index d195738..b82a851 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -1398,7 +1398,7 @@ set_update_fill (gboolean active) if (active) { if (fill_id == 0) { fill_id = - g_timeout_add (FILL_INTERVAL, (GtkFunction) update_fill, pipeline); + g_timeout_add (FILL_INTERVAL, (GSourceFunc) update_fill, pipeline); } } else { if (fill_id) { @@ -1417,7 +1417,7 @@ set_update_scale (gboolean active) if (active) { if (update_id == 0) { update_id = - g_timeout_add (UPDATE_INTERVAL, (GtkFunction) update_scale, pipeline); + g_timeout_add (UPDATE_INTERVAL, (GSourceFunc) update_scale, pipeline); } } else { if (update_id) { @@ -2787,8 +2787,6 @@ main (int argc, char **argv) shuttle_hscale = gtk_hscale_new (shuttle_adjustment); gtk_scale_set_digits (GTK_SCALE (shuttle_hscale), 2); gtk_scale_set_value_pos (GTK_SCALE (shuttle_hscale), GTK_POS_TOP); - gtk_range_set_update_policy (GTK_RANGE (shuttle_hscale), - GTK_UPDATE_CONTINUOUS); g_signal_connect (shuttle_hscale, "value_changed", G_CALLBACK (shuttle_value_changed), pipeline); g_signal_connect (shuttle_hscale, "format_value", @@ -2807,7 +2805,6 @@ main (int argc, char **argv) gtk_scale_set_value_pos (GTK_SCALE (hscale), GTK_POS_RIGHT); gtk_range_set_show_fill_level (GTK_RANGE (hscale), TRUE); gtk_range_set_fill_level (GTK_RANGE (hscale), N_GRAD); - gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS); g_signal_connect (hscale, "button_press_event", G_CALLBACK (start_seek), pipeline);