From e8d5be0ba79eef766fff723012c5d1994da84b4c Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 24 Jan 2011 11:49:04 +0000 Subject: [PATCH] ClutterTimeline: Fix the 'msecs' parameter for the new-frame signal Between Clutter 0.8 and 1.0, the new-frame signal of ClutterTimeline changed the second parameter to be an elapsed time in milliseconds rather than the frame number. However a few places in clutter were still calling the parameter 'frame_num' which is a bit misleading. Notably the signature for the signal class closure in the header was using the wrong name. This changes them to use 'msecs'. --- clutter/clutter-alpha.c | 2 +- clutter/clutter-timeline.h | 2 +- tests/conform/test-timeline-rewind.c | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/clutter/clutter-alpha.c b/clutter/clutter-alpha.c index e65bf0954..262837333 100644 --- a/clutter/clutter-alpha.c +++ b/clutter/clutter-alpha.c @@ -149,7 +149,7 @@ static GParamSpec *obj_props[PROP_LAST]; static void timeline_new_frame_cb (ClutterTimeline *timeline, - guint current_frame_num, + guint msecs, ClutterAlpha *alpha) { ClutterAlphaPrivate *priv = alpha->priv; diff --git a/clutter/clutter-timeline.h b/clutter/clutter-timeline.h index 4cb2fa4a8..95f2bfa9f 100644 --- a/clutter/clutter-timeline.h +++ b/clutter/clutter-timeline.h @@ -96,7 +96,7 @@ struct _ClutterTimelineClass void (*paused) (ClutterTimeline *timeline); void (*new_frame) (ClutterTimeline *timeline, - gint frame_num); + gint msecs); void (*marker_reached) (ClutterTimeline *timeline, const gchar *marker_name, diff --git a/tests/conform/test-timeline-rewind.c b/tests/conform/test-timeline-rewind.c index 888affbb4..f9dbf91c9 100644 --- a/tests/conform/test-timeline-rewind.c +++ b/tests/conform/test-timeline-rewind.c @@ -35,11 +35,9 @@ watchdog_timeout (TestState *state) static void new_frame_cb (ClutterTimeline *timeline, - gint frame_num, + gint elapsed_time, TestState *state) { - gint elapsed_time = clutter_timeline_get_elapsed_time (timeline); - if (elapsed_time == TEST_TIMELINE_DURATION) { g_test_message ("new-frame signal received (end of timeline)");