property-transition: Remove animatable from the ctor

Should not have been there in the first place: the animatable will be
set either using ClutterTransition API, or when adding the transition
to a ClutterActor.
This commit is contained in:
Emmanuele Bassi 2012-03-20 11:47:41 +00:00
parent 552a949695
commit 15952f26cb
3 changed files with 7 additions and 9 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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);