GParamSpec *pspec)
{
GtkTimeline *timeline;
- GtkTimelinePriv *priv;
timeline = GTK_TIMELINE (object);
- priv = timeline->priv;
switch (prop_id)
{
break;
case GTK_TIMELINE_PROGRESS_EASE:
- progress = (sinf ((progress - 0.5) * G_PI) + 1) / 2;
+ progress = (sin ((progress - 0.5) * G_PI) + 1) / 2;
break;
case GTK_TIMELINE_PROGRESS_EASE_IN:
progress = pow (progress, 3);
if ((priv->direction == GTK_TIMELINE_DIRECTION_FORWARD && progress == 1.0) ||
(priv->direction == GTK_TIMELINE_DIRECTION_BACKWARD && progress == 0.0))
{
- if (!priv->loop)
+ gboolean loop;
+
+ loop = priv->loop && priv->animations_enabled;
+
+ if (loop)
+ _gtk_timeline_rewind (timeline);
+ else
{
if (priv->source_id)
{
g_signal_emit (timeline, signals [FINISHED], 0);
return FALSE;
}
- else
- _gtk_timeline_rewind (timeline);
}
return TRUE;
g_object_get (settings, "gtk-enable-animations", &enable_animations, NULL);
}
- priv->animations_enabled = (enable_animations == TRUE);
+ priv->animations_enabled = enable_animations;
g_signal_emit (timeline, signals [STARTED], 0);