Re: Upgrading deprecations



On 13/05/13 10:36, phantomjinx wrote:
Hi,

I am trying to bring the coverflow CD animation in gtkpod up to version 1.12 by removing the
deprecations.

Having replaced ClutterBehaviour and ClutterAnimation with use of the easing state as described here
[1], I have
run into a problem.

Clicking the right button scrolls the set of CD covers to the left and likewise clicking the left
button scrolls to the right.

With an easing duration of 1600ms, this works nicely except that the rotation is always clockwise
whereas with ClutterBehaviour I was
able to set it to counter-clockwise ensuring that a CD cover would rotate the shortest way around,
rather than spinning needlessly.

You will have to implement this behavior yourself :(


Secondly and more importantly, if I click the right button quickly, the animation may still be in
the middle hence the covers end up out of
position to the point that some even end up on the wrong side of the screen. I originally got around
this by calling clutter_timeline_stop
and clearing all clutter behaviours before starting a new animation. How would I achieve the same
kind of thing with the easing state please?

When doing an implicit animation on an actor, you can get a ClutterTransition object (subclass of ClutterTimeline) by calling clutter_actor_get_transition() (might return NULL if no implicit animations are running). You can use the returned object to stop the implicit animation and trigger a new implicit animation.



My attempts so far can be found here [2].

Any help much appreciated.

Thanks

PGR

[1] https://developer.gnome.org/clutter/stable/migrating-ClutterAnimation.html
[2]
https://gitorious.org/~phantomjinx/gtkpod/phantomjinx-gtkpod-plugin/blobs/updating-clarity/plugins/clarity/clarity_canvas.c




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