fprintf(stderr, "change tram t=%f x=%d y=%d scale=%d\n", t, x, y, scale);
actor_set_position_full(actor->widget, x, y, actor->z);
hildon_animation_actor_set_scale(actor->widget, (double)scale/100, (double)scale/100);
-
+ if (t >= 1){
+ /* stop animation */
+ actor->visible = FALSE;
+ destroy_hildon_actor(actor);
+ actor->time_start_animation = now + 20;
+ }
}
void
create_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin)
actor = init_object(desktop_plugin, "tram", "tram_dark.png", -300, 225, 25, 350, 210,
FALSE, 100, 255, &change_tram, NULL);
actor->time_start_animation = time(NULL) + 10;
- actor->duration_animation = 60;
+ actor->duration_animation = 20;
scene.actors = g_slist_append(scene.actors, actor);
#if 0
anim = g_new0(Animation, 1);
tmp = scene.actors;
while (tmp != NULL){
actor = tmp->data;
- if (now >= actor->time_start_animation &&
- now - actor->time_start_animation <= actor->duration_animation){
+ if (now >= actor->time_start_animation
+ /* && now - actor->time_start_animation <= actor->duration_animation*/){
pfunc = actor->func_change;
if (pfunc)
(*pfunc)(actor, desktop_plugin);
init_scene(desktop_plugin);
else if (!strcmp(priv->theme,"Berlin"))
init_scene(desktop_plugin);
- priv->timer = g_timeout_add(1000*5, plugin_on_timeout, desktop_plugin);
+ priv->timer = g_timeout_add(1000*3, plugin_on_timeout, desktop_plugin);
}
static void