clutter/timeline: Remove clutter_timeline_clone()

It was deprecated long ago, and users should switch to using te regular
constructors.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1289
This commit is contained in:
Jonas Ådahl 2020-04-16 10:17:51 +02:00 committed by Georges Basile Stavracas Neto
parent 08b30d6fe2
commit a05dd813da
3 changed files with 2 additions and 42 deletions

View File

@ -1321,43 +1321,6 @@ clutter_timeline_is_playing (ClutterTimeline *timeline)
return timeline->priv->is_playing;
}
/**
* clutter_timeline_clone:
* @timeline: #ClutterTimeline to duplicate.
*
* Create a new #ClutterTimeline instance which has property values
* matching that of supplied timeline. The cloned timeline will not
* be started and will not be positioned to the current position of
* the original @timeline: you will have to start it with
* clutter_timeline_start().
*
* The only cloned properties are:
*
* - #ClutterTimeline:duration
* - #ClutterTimeline:delay
* - #ClutterTimeline:direction
*
* Return value: (transfer full): a new #ClutterTimeline, cloned
* from @timeline
*
* Since: 0.4
*
* Deprecated: 1.10: Use clutter_timeline_new() or g_object_new()
* instead
*/
ClutterTimeline *
clutter_timeline_clone (ClutterTimeline *timeline)
{
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), NULL);
return g_object_new (CLUTTER_TYPE_TIMELINE,
"duration", timeline->priv->duration,
"repeat-count", timeline->priv->repeat_count,
"delay", timeline->priv->delay,
"direction", timeline->priv->direction,
NULL);
}
/**
* clutter_timeline_new:
* @duration_ms: Duration of the timeline in milliseconds

View File

@ -26,9 +26,6 @@
G_BEGIN_DECLS
CLUTTER_DEPRECATED_FOR(clutter_timeline_new)
ClutterTimeline * clutter_timeline_clone (ClutterTimeline *timeline);
G_END_DECLS
#endif /* __CLUTTER_TIMELINE_PRIVATE_H__ */

View File

@ -212,7 +212,7 @@ timeline_base (void)
g_strfreev (markers);
timeline_data_init (&data_2, 2);
timeline_2 = clutter_timeline_clone (timeline_1);
timeline_2 = clutter_timeline_new (FRAME_COUNT * 1000 / FPS);
clutter_timeline_add_marker_at_time (timeline_2, "bar", 2 * 1000 / FPS);
markers = clutter_timeline_list_markers (timeline_2, -1, &n_markers);
g_assert (markers != NULL);
@ -221,7 +221,7 @@ timeline_base (void)
g_strfreev (markers);
timeline_data_init (&data_3, 3);
timeline_3 = clutter_timeline_clone (timeline_1);
timeline_3 = clutter_timeline_new (FRAME_COUNT * 1000 / FPS);
clutter_timeline_set_direction (timeline_3, CLUTTER_TIMELINE_BACKWARD);
clutter_timeline_add_marker_at_time (timeline_3, "start-marker",
FRAME_COUNT * 1000 / FPS);