- fprintf(stderr, "change slideshow num=%d prev=%d next=%d\n", num, prev, next);
+ now = time(NULL);
+ num = actor->scale; // total number of images
+ prev = actor->opacity; // number of current image
+ next = actor->z; // number of new image
+ if (next < 0){
+ // new image not selected, first step of animation
+ srand(now);
+ next = rand()%num;
+ while (num > 1 && next == prev)
+ next = rand()%num;
+ a2 = g_ptr_array_index(actor->child, next);
+ a2->visible = TRUE;
+ create_hildon_actor(a2, desktop_plugin);
+ set_actor_opacity(a2, 0);
+ actor->z = next;
+ }else {
+ a2 = g_ptr_array_index(actor->child, next);
+ }
+
+ gettimeofday(&tvb, NULL);
+
+ ms = tvb.tv_usec;
+ sec = tvb.tv_sec;
+
+ t = (double)((double)sec+(double)ms/1000000 - actor->time_start_animation) / actor->duration_animation;
+
+ set_actor_opacity(a2, path_line(0, 255, t));