From faec5c468ba77e61a3f724be49f031be65ef2011 Mon Sep 17 00:00:00 2001 From: Jonas Bonn Date: Thu, 28 May 2009 09:47:45 +0200 Subject: [PATCH] Freeze notifiers around property setters Notifications should be fired off from both the internal timeline and the wrapping animation here, so notifiers should be frozen around these property setters. Signed-off-by: Jonas Bonn Signed-off-by: Emmanuele Bassi --- clutter/clutter-animation.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/clutter/clutter-animation.c b/clutter/clutter-animation.c index 9fbb71f20..f84368142 100644 --- a/clutter/clutter-animation.c +++ b/clutter/clutter-animation.c @@ -1075,11 +1075,15 @@ clutter_animation_set_duration (ClutterAnimation *animation, g_return_if_fail (CLUTTER_IS_ANIMATION (animation)); + g_object_freeze_notify (G_OBJECT (animation)); + timeline = clutter_animation_get_timeline_internal (animation); clutter_timeline_set_duration (timeline, msecs); clutter_timeline_rewind (timeline); g_object_notify (G_OBJECT (animation), "duration"); + + g_object_thaw_notify (G_OBJECT (animation)); } /** @@ -1105,10 +1109,14 @@ clutter_animation_set_loop (ClutterAnimation *animation, g_return_if_fail (CLUTTER_IS_ANIMATION (animation)); + g_object_freeze_notify (G_OBJECT (animation)); + timeline = clutter_animation_get_timeline_internal (animation); clutter_timeline_set_loop (timeline, loop); g_object_notify (G_OBJECT (animation), "loop"); + + g_object_thaw_notify (G_OBJECT (animation)); } /**