diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index a0923322d..d067ae5a8 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -17124,8 +17124,7 @@ _clutter_actor_create_transition (ClutterActor *actor, g_value_unset (&initial); g_value_unset (&final); - res = clutter_property_transition_new (CLUTTER_ANIMATABLE (actor), - pspec->name); + res = clutter_property_transition_new (pspec->name); clutter_transition_set_interval (res, interval); clutter_transition_set_remove_on_complete (res, TRUE); @@ -17210,6 +17209,8 @@ clutter_actor_add_transition (ClutterActor *self, return; } + clutter_transition_set_animatable (transition, CLUTTER_ANIMATABLE (self)); + timeline = CLUTTER_TIMELINE (transition); clutter_timeline_set_delay (timeline, info->cur_state->easing_delay); diff --git a/clutter/clutter-property-transition.c b/clutter/clutter-property-transition.c index 0bd32bdd3..302e16589 100644 --- a/clutter/clutter-property-transition.c +++ b/clutter/clutter-property-transition.c @@ -97,6 +97,7 @@ clutter_property_transition_compute_value (ClutterTransition *transition, GValue value = G_VALUE_INIT; gboolean res; + /* if we have a GParamSpec we also have an animatable instance */ if (priv->pspec == NULL) return; @@ -210,10 +211,9 @@ clutter_property_transition_init (ClutterPropertyTransition *self) /** * clutter_property_transition_new: - * @animatable: (allow-none): a #ClutterAnimatable, or %NULL * @property_name: (allow-none): a property of @animatable, or %NULL * - * Creates a new #ClutterPropertyTransition for @animatable. + * Creates a new #ClutterPropertyTransition. * * Return value: (transfer full): the newly created #ClutterPropertyTransition. * Use g_object_unref() when done @@ -221,11 +221,9 @@ clutter_property_transition_init (ClutterPropertyTransition *self) * Since: 1.10 */ ClutterTransition * -clutter_property_transition_new (ClutterAnimatable *animatable, - const char *property_name) +clutter_property_transition_new (const char *property_name) { return g_object_new (CLUTTER_TYPE_PROPERTY_TRANSITION, - "animatable", animatable, "property-name", property_name, NULL); } diff --git a/clutter/clutter-property-transition.h b/clutter/clutter-property-transition.h index 09b0a9568..0d32f162c 100644 --- a/clutter/clutter-property-transition.h +++ b/clutter/clutter-property-transition.h @@ -79,8 +79,7 @@ CLUTTER_AVAILABLE_IN_1_10 GType clutter_property_transition_get_type (void) G_GNUC_CONST; CLUTTER_AVAILABLE_IN_1_10 -ClutterTransition * clutter_property_transition_new (ClutterAnimatable *animatable, - const char *property_name); +ClutterTransition * clutter_property_transition_new (const char *property_name); CLUTTER_AVAILABLE_IN_1_10 void clutter_property_transition_set_property_name (ClutterPropertyTransition *transition, const char *property_name);