void
change_window1(Actor * actor, AWallpaperPlugin *desktop_plugin)
{
-
gint now = time(NULL);
if (scene.daytime == TIME_DAY){
- if (actor->visible){
+ if (actor->widget){
actor->visible = FALSE;
destroy_hildon_actor(actor);
}
actor->time_start_animation = 0;
return;
- }else if (actor->time_start_animation == 0){
- actor->time_start_animation = now + fast_rnd(30);
- return;
+ }else {
+ if (!actor->widget)
+ create_hildon_actor(actor, desktop_plugin);
+ if (actor->time_start_animation == 0){
+ actor->time_start_animation = now + fast_rnd(30);
+ return;
+ }
}
- if (!actor->visible){
+ if (!actor->visible)
actor->visible = TRUE;
- create_hildon_actor(actor, desktop_plugin);
- actor->time_start_animation = now + fast_rnd(60) + 10;
- }else {
+ else
actor->visible = FALSE;
- destroy_hildon_actor(actor);
- actor->time_start_animation = now + fast_rnd(60) + 10;
- }
-
+ hildon_animation_actor_set_show(
+ HILDON_ANIMATION_ACTOR(actor->widget),
+ actor->visible
+ );
+ actor->time_start_animation = now + fast_rnd(60) + 10;
+
}
void