[clutter] actor: Remove the implicit easing state save



commit 229241b8757a0192f2c2ade3f0ce50f311aeea99
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Sat Mar 17 16:46:38 2012 +0000

    actor: Remove the implicit easing state save
    
    When setting the easing mode, duration, or delay without having ever
    called clutter_actor_save_easing_state(). It's confusing, and not
    really nice.
    
    In the future, we'll have a default easing state implicitly created by
    the actor itself, but for the time being explicitly opting in is
    preferrable.

 clutter/clutter-actor.c |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index d412036..e4de191 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -17241,10 +17241,6 @@ clutter_actor_remove_all_transitions (ClutterActor *self)
  * Sets the duration of the tweening for animatable properties
  * of @self for the current easing state.
  *
- * Calling this function will implicitly call
- * clutter_actor_save_easing_state() if no previous call to
- * that function was made.
- *
  * Since: 1.10
  */
 void
@@ -17257,8 +17253,12 @@ clutter_actor_set_easing_duration (ClutterActor *self,
 
   info = _clutter_actor_get_animation_info (self);
 
-  if (info->states == NULL)
-    clutter_actor_save_easing_state (self);
+  if (info->cur_state == NULL)
+    {
+      g_warning ("You must call clutter_actor_save_easing_state() prior "
+                 "to calling clutter_actor_set_easing_duration().");
+      return;
+    }
 
   if (info->cur_state->easing_duration != msecs)
     info->cur_state->easing_duration = msecs;
@@ -17298,10 +17298,6 @@ clutter_actor_get_easing_duration (ClutterActor *self)
  * Sets the easing mode for the tweening of animatable properties
  * of @self.
  *
- * Calling this function will implicitly call
- * clutter_actor_save_easing_state() if no previous calls to
- * that function were made.
- *
  * Since: 1.10
  */
 void
@@ -17316,8 +17312,12 @@ clutter_actor_set_easing_mode (ClutterActor         *self,
 
   info = _clutter_actor_get_animation_info (self);
 
-  if (info->states == NULL)
-    clutter_actor_save_easing_state (self);
+  if (info->cur_state == NULL)
+    {
+      g_warning ("You must call clutter_actor_save_easing_state() prior "
+                 "to calling clutter_actor_set_easing_mode().");
+      return;
+    }
 
   if (info->cur_state->easing_mode != mode)
     info->cur_state->easing_mode = mode;
@@ -17357,10 +17357,6 @@ clutter_actor_get_easing_mode (ClutterActor *self)
  * Sets the delay that should be applied before tweening animatable
  * properties.
  *
- * Calling this function will implicitly call
- * clutter_actor_save_easing_state() if no previous calls to
- * that function were made.
- *
  * Since: 1.10
  */
 void
@@ -17373,8 +17369,12 @@ clutter_actor_set_easing_delay (ClutterActor *self,
 
   info = _clutter_actor_get_animation_info (self);
 
-  if (info->states == NULL)
-    clutter_actor_save_easing_state (self);
+  if (info->cur_state == NULL)
+    {
+      g_warning ("You must call clutter_actor_save_easing_state() prior "
+                 "to calling clutter_actor_set_easing_delay().");
+      return;
+    }
 
   if (info->cur_state->easing_delay != msecs)
     info->cur_state->easing_delay = msecs;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]