Commit e75da74a authored by Mart Raudsepp's avatar Mart Raudsepp Committed by Sebastian Dröge
Browse files

examples: Correct casting of g_signal* funcs first arguments

This completes the deprecated GTK API fix in commits 81a0a986 and
79adfa54 - unlike gtk_signal_connect and co, g_signal_connect and
co take a gpointer, not a GtkObject.
parent 97519751
......@@ -300,8 +300,9 @@ start_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
}
if (changed_id == 0) {
changed_id = g_signal_connect (GTK_OBJECT (hscale),
"value_changed", G_CALLBACK (seek_cb), pipeline);
changed_id =
g_signal_connect (hscale, "value_changed", G_CALLBACK (seek_cb),
pipeline);
}
GST_DEBUG ("start seek");
......@@ -407,8 +408,9 @@ bus_message (GstBus * bus, GstMessage * message, gpointer data)
GST_DEBUG ("segment_done, doing next seek");
if (!do_seek (hscale, FALSE, update_id == 0)) {
if (changed_id == 0) {
changed_id = g_signal_connect (GTK_OBJECT (hscale),
"value_changed", G_CALLBACK (seek_cb), pipeline);
changed_id =
g_signal_connect (hscale, "value_changed", G_CALLBACK (seek_cb),
pipeline);
}
}
break;
......@@ -513,15 +515,16 @@ main (int argc, char **argv)
gtk_scale_set_digits (GTK_SCALE (shscale), 2);
gtk_range_set_update_policy (GTK_RANGE (shscale), GTK_UPDATE_CONTINUOUS);
schanged_id = g_signal_connect (GTK_OBJECT (shscale),
"value_changed", G_CALLBACK (speed_cb), pipeline);
schanged_id =
g_signal_connect (shscale, "value_changed", G_CALLBACK (speed_cb),
pipeline);
g_signal_connect (GTK_OBJECT (hscale),
"button_press_event", G_CALLBACK (start_seek), pipeline);
g_signal_connect (GTK_OBJECT (hscale),
"button_release_event", G_CALLBACK (stop_seek), pipeline);
g_signal_connect (GTK_OBJECT (hscale),
"format_value", G_CALLBACK (format_value), pipeline);
g_signal_connect (hscale, "button_press_event", G_CALLBACK (start_seek),
pipeline);
g_signal_connect (hscale, "button_release_event", G_CALLBACK (stop_seek),
pipeline);
g_signal_connect (hscale, "format_value", G_CALLBACK (format_value),
pipeline);
/* do the packing stuff ... */
gtk_window_set_default_size (GTK_WINDOW (window), 96, 96);
......
......@@ -1412,8 +1412,9 @@ start_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
}
if (changed_id == 0 && flush_seek && scrub) {
changed_id = g_signal_connect (GTK_OBJECT (hscale),
"value_changed", G_CALLBACK (seek_cb), pipeline);
changed_id =
g_signal_connect (hscale, "value_changed", G_CALLBACK (seek_cb),
pipeline);
}
return FALSE;
......@@ -1423,7 +1424,7 @@ static gboolean
stop_seek (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
{
if (changed_id) {
g_signal_handler_disconnect (GTK_OBJECT (hscale), changed_id);
g_signal_handler_disconnect (hscale, changed_id);
changed_id = 0;
}
......@@ -2703,8 +2704,8 @@ main (int argc, char **argv)
shuttle_checkbox = gtk_check_button_new_with_label ("Shuttle");
gtk_box_pack_start (GTK_BOX (hbox), shuttle_checkbox, FALSE, FALSE, 2);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (shuttle_checkbox), FALSE);
g_signal_connect (GTK_OBJECT (shuttle_checkbox),
"toggled", G_CALLBACK (shuttle_toggled), pipeline);
g_signal_connect (shuttle_checkbox, "toggled", G_CALLBACK (shuttle_toggled),
pipeline);
shuttle_adjustment =
GTK_ADJUSTMENT (gtk_adjustment_new (0.0, -3.00, 4.0, 0.1, 1.0, 1.0));
......@@ -2713,9 +2714,9 @@ main (int argc, char **argv)
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 (GTK_OBJECT (shuttle_hscale), "value_changed",
g_signal_connect (shuttle_hscale, "value_changed",
G_CALLBACK (shuttle_value_changed), pipeline);
g_signal_connect (GTK_OBJECT (shuttle_hscale), "format_value",
g_signal_connect (shuttle_hscale, "format_value",
G_CALLBACK (shuttle_format_value), pipeline);
gtk_box_pack_start (GTK_BOX (hbox), shuttle_hscale, TRUE, TRUE, 2);
......@@ -2735,12 +2736,12 @@ main (int argc, char **argv)
#endif
gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS);
g_signal_connect (GTK_OBJECT (hscale),
"button_press_event", G_CALLBACK (start_seek), pipeline);
g_signal_connect (GTK_OBJECT (hscale),
"button_release_event", G_CALLBACK (stop_seek), pipeline);
g_signal_connect (GTK_OBJECT (hscale),
"format_value", G_CALLBACK (format_value), pipeline);
g_signal_connect (hscale, "button_press_event", G_CALLBACK (start_seek),
pipeline);
g_signal_connect (hscale, "button_release_event", G_CALLBACK (stop_seek),
pipeline);
g_signal_connect (hscale, "format_value", G_CALLBACK (format_value),
pipeline);
if (pipeline_type == 16) {
/* the playbin2 panel controls for the video/audio/subtitle tracks */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment