added dark clouds in the night
[livewp] / applet / src / livewp-home-widget.c
index 643d9ee..2615524 100644 (file)
@@ -463,6 +463,7 @@ change_cloud(Actor *actor, AWallpaperPlugin *desktop_plugin)
     suseconds_t ms;
     long sec;
     double t;
+    gchar *newfile;
 
     //fprintf(stderr, "change cloud\n");
     gettimeofday(&tvb, NULL);
@@ -473,10 +474,16 @@ change_cloud(Actor *actor, AWallpaperPlugin *desktop_plugin)
    
     if (!actor->visible){
         actor->visible = TRUE;
-        if (scene.daytime == TIME_NIGHT)
-            actor->filename = actor->filename;
-        else
-            actor->filename = actor->filename;
+        if (scene.daytime == TIME_NIGHT){
+            newfile = g_strdup_printf("%s_dark.png", actor->name);
+        }else{
+            newfile = g_strdup_printf("%s.png", actor->name);
+        } 
+        if (actor->filename)
+            g_free(actor->filename);
+        actor->filename = newfile;
+         
+
         create_hildon_actor(actor, desktop_plugin);
     }
     t = (double)((double)sec+(double)ms/1000000 - actor->time_start_animation) / actor->duration_animation;
@@ -885,7 +892,7 @@ init_scene(AWallpaperPlugin *desktop_plugin)
     for (i=0; i<8; i++){
         actor = init_object(desktop_plugin, "window2", "window2.png", 
                             winds[i][0], winds[i][1], 8, 8, 10, 
-                            TRUE, 100, 255, (gpointer)&change_window1, NULL);
+                            FALSE, 100, 255, (gpointer)&change_window1, NULL);
         //change_window1(actor, desktop_plugin);
         actor->time_start_animation = now + fast_rnd(30);
         scene.actors = g_slist_append(scene.actors, actor);