range: Use public delay-factory API

This commit is contained in:
Timm Bäder 2019-08-10 20:08:59 +02:00
parent 8c88453816
commit c6961f1b61

View File

@ -580,7 +580,7 @@ gtk_range_init (GtkRange *range)
gtk_gesture_group (priv->drag_gesture, gesture); gtk_gesture_group (priv->drag_gesture, gesture);
gesture = gtk_gesture_long_press_new (); gesture = gtk_gesture_long_press_new ();
g_object_set (gesture, "delay-factor", 2.0, NULL); gtk_gesture_long_press_set_delay_factor (GTK_GESTURE_LONG_PRESS (gesture), 2.0);
g_signal_connect (gesture, "pressed", g_signal_connect (gesture, "pressed",
G_CALLBACK (gtk_range_long_press_gesture_pressed), range); G_CALLBACK (gtk_range_long_press_gesture_pressed), range);
gtk_widget_add_controller (GTK_WIDGET (range), GTK_EVENT_CONTROLLER (gesture)); gtk_widget_add_controller (GTK_WIDGET (range), GTK_EVENT_CONTROLLER (gesture));