From 47fbcc208c075126fe3e3e8567937dbff71ead9c Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Thu, 22 Jul 2010 14:21:06 +0200 Subject: ido_timeline_set_progress() --- src/idotimeline.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/idotimeline.c') diff --git a/src/idotimeline.c b/src/idotimeline.c index bcf875b..e3c32a9 100644 --- a/src/idotimeline.c +++ b/src/idotimeline.c @@ -688,6 +688,27 @@ ido_timeline_get_progress (IdoTimeline *timeline) return priv->progress; } +void +ido_timeline_set_progress (IdoTimeline *timeline, gdouble progress) +{ + IdoTimelinePriv *priv; + + g_return_if_fail (IDO_IS_TIMELINE (timeline)); + + priv = IDO_TIMELINE_GET_PRIV (timeline); + + if (priv->source_id) + { + g_timer_stop (priv->timer); + g_source_remove (priv->source_id); + priv->source_id = 0; + } + + priv->progress = progress; + + ido_timeline_start (timeline); +} + gdouble ido_timeline_calculate_progress (gdouble linear_progress, IdoTimelineProgressType progress_type) -- cgit v1.2.3