void
destroy_hildon_actor(Actor *actor)
{
- fprintf(stderr, "destroy_hildon_actor %s\n",actor->name);
+ //fprintf(stderr, "destroy_hildon_actor %s\n",actor->name);
gtk_widget_destroy(actor->widget);
actor->widget = NULL;
}
long sec;
double t;
+ //fprintf(stderr, "change tram\n");
gettimeofday(&tvb, NULL);
ms = tvb.tv_usec;
long sec;
double t;
+ //fprintf(stderr, "change cloud\n");
gettimeofday(&tvb, NULL);
ms = tvb.tv_usec;
if (scene.wind_orientation == 0) scene.wind_orientation = -1;
scene.wind_angle = (double)(fast_rnd(200) - 100) / 100;
actor->time_start_animation = time(NULL) + (fast_rnd(10) + 10) * 60;
- fprintf(stderr, "change wind orient = %d angle = %f after = %d\n", scene.wind_orientation, scene.wind_angle, actor->time_start_animation-time(NULL));
+ //fprintf(stderr, "change wind orient = %d angle = %f after = %d\n", scene.wind_orientation, scene.wind_angle, actor->time_start_animation-time(NULL));
}
void
if (!actor->visible){
actor->visible = TRUE;
create_hildon_actor(actor, desktop_plugin);
- actor->time_start_animation = now + fast_rnd(20) + 10;
+ actor->time_start_animation = now + fast_rnd(60) + 10;
}else {
actor->visible = FALSE;
destroy_hildon_actor(actor);
- actor->time_start_animation = now + fast_rnd(20) + 10;
+ actor->time_start_animation = now + fast_rnd(60) + 10;
}
}
actor = init_object(desktop_plugin, "cloud1", "cloud1.png", 0, fast_rnd(300)-97, 7, 150, 97,
FALSE, 100, 255, (gpointer)&change_cloud, NULL);
actor->time_start_animation = now + fast_rnd(180);
- actor->duration_animation = 5*60;
+ actor->duration_animation = 3*60;
scene.actors = g_slist_append(scene.actors, actor);
actor = init_object(desktop_plugin, "cloud2", "cloud2.png", 0, fast_rnd(300)-75, 7, 188, 75,
FALSE, 100, 255, (gpointer)&change_cloud, NULL);
actor->time_start_animation = now + fast_rnd(180);
- actor->duration_animation = 5*60;
+ actor->duration_animation = 3*60;
scene.actors = g_slist_append(scene.actors, actor);
actor = init_object(desktop_plugin, "cloud4", "cloud4.png", 0, fast_rnd(300)-75, 7, 150, 75,
change_sun(actor, desktop_plugin);
scene.actors = g_slist_append(scene.actors, actor);
-
+#if 0
actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 11, 50, 50,
TRUE, 100, 255, NULL, NULL);
scene.actors = g_slist_append(scene.actors, actor);
-
+#endif
actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 15, 6, 60, 60,
FALSE, 100, 255, (gpointer)&change_moon, NULL);
actor = init_object(desktop_plugin, "cloud1", "cloud1.png", 0, fast_rnd(300)-97, 7, 150, 97,
FALSE, 100, 255, (gpointer)&change_cloud, NULL);
actor->time_start_animation = now + fast_rnd(180);
- actor->duration_animation = 5*60;
+ actor->duration_animation = 3*60;
scene.actors = g_slist_append(scene.actors, actor);
actor = init_object(desktop_plugin, "cloud2", "cloud2.png", 0, fast_rnd(300)-75, 7, 188, 75,
FALSE, 100, 255, (gpointer)&change_cloud, NULL);
actor->time_start_animation = now + fast_rnd(180);
- actor->duration_animation = 5*60;
+ actor->duration_animation = 3*60;
scene.actors = g_slist_append(scene.actors, actor);
actor = init_object(desktop_plugin, "cloud4", "cloud4.png", 0, fast_rnd(300)-75, 7, 150, 75,
if (now >= actor->time_start_animation
&& actor->time_start_animation > 0
&& desktop_plugin->priv->short_timer == 0){
- actor->time_start_animation = now;
/* fprintf(stderr, "start short timer act = %s %d\n", actor->name, now); */
- if (desktop_plugin->priv->rich_animation)
+ if (desktop_plugin->priv->rich_animation){
+ actor->time_start_animation = now;
desktop_plugin->priv->short_timer = g_timeout_add(SHORT_TIMER, (GtkFunction)short_timeout, desktop_plugin);
+ }
+ else {
+ (*actor->func_change)(actor, desktop_plugin);
+ }
}
tmp = g_slist_next(tmp);
}