some changes in demo
[livewp] / applet / src / livewp-home-widget.c
index e8f6edf..5eb2ac7 100644 (file)
@@ -261,16 +261,18 @@ change_moon(Actor * actor, AWallpaperPlugin *desktop_plugin)
 {
     gint phase;
     char *newfile;
-
+fprintf(stderr, "change moon\n");
     if (actor){
         if (scene.daytime == TIME_NIGHT){
             if (!actor->visible){
                 actor->visible = TRUE;
+#if 0
                 phase = get_moon_phase();
                 newfile = g_strdup_printf( "%s%d.png", actor->name, phase);
                 if (actor->filename)
                     g_free(actor->filename);
                 actor->filename = newfile;
+#endif
                 create_hildon_actor(actor, desktop_plugin);
 
             }
@@ -339,7 +341,7 @@ change_tram(Actor * actor, AWallpaperPlugin *desktop_plugin)
     
     if (!actor->visible){
         actor->visible = TRUE;
-        if (scene.daytime == TIME_NIGHT || (hour > 20 || hour < 6)){
+        if (scene.daytime == TIME_NIGHT){
             if (actor->filename)
                 g_free(actor->filename);
             actor->filename = g_strdup("tram_dark.png");
@@ -350,7 +352,7 @@ change_tram(Actor * actor, AWallpaperPlugin *desktop_plugin)
         }
         create_hildon_actor(actor, desktop_plugin);
     }
-    if (scene.daytime == TIME_NIGHT || (hour > 20 || hour < 6)){
+    if (scene.daytime == TIME_NIGHT){
             newfile = g_strdup("tram_dark.png");
         }else{
             newfile = g_strdup("tram.png");
@@ -407,7 +409,7 @@ change_plane1(Actor *actor, AWallpaperPlugin *desktop_plugin)
         actor->visible = TRUE;
         create_hildon_actor(actor, desktop_plugin);
     }
-if (scene.daytime == TIME_NIGHT || (hour > 20 || hour < 6)){
+if (scene.daytime == TIME_NIGHT){
             newfile = g_strdup("dot1.png");
         }else{
             newfile = g_strdup("tu154.png");
@@ -467,7 +469,7 @@ change_plane2(Actor *actor, AWallpaperPlugin *desktop_plugin)
         actor->visible = TRUE;
         create_hildon_actor(actor, desktop_plugin);
     }
-if (scene.daytime == TIME_NIGHT || (hour > 20 || hour < 6)){
+if (scene.daytime == TIME_NIGHT){
             newfile = g_strdup("dot1.png");
         }else{
             newfile = g_strdup("plane3.png");
@@ -521,7 +523,7 @@ change_cloud(Actor *actor, AWallpaperPlugin *desktop_plugin)
    
     if (!actor->visible){
         actor->visible = TRUE;
-        if (scene.daytime == TIME_NIGHT || (hour > 20 || hour < 6)){
+        if (scene.daytime == TIME_NIGHT){
             newfile = g_strdup_printf("%s_dark.png", actor->name);
         }else{
             newfile = g_strdup_printf("%s.png", actor->name);
@@ -533,7 +535,7 @@ change_cloud(Actor *actor, AWallpaperPlugin *desktop_plugin)
 
         create_hildon_actor(actor, desktop_plugin);
     }
-    if (scene.daytime == TIME_NIGHT || (hour > 20 || hour < 6)){
+    if (scene.daytime == TIME_NIGHT){
             newfile = g_strdup_printf("%s_dark.png", actor->name);
         }else{
             newfile = g_strdup_printf("%s.png", actor->name);
@@ -605,11 +607,11 @@ change_window1(Actor * actor, AWallpaperPlugin *desktop_plugin)
     if (!actor->visible){
         actor->visible = TRUE;
         create_hildon_actor(actor, desktop_plugin);
-        actor->time_start_animation = now + 10;
+        actor->time_start_animation = now + 5;
     }else {
         actor->visible = FALSE;
         destroy_hildon_actor(actor);
-        actor->time_start_animation = now + 10;
+        actor->time_start_animation = now + 5;
     }
    
 }
@@ -865,7 +867,7 @@ init_scene(AWallpaperPlugin *desktop_plugin)
   change_static_actor_with_corner(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
   
-  actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 20, 6, 60, 60, 
+  actor = init_object(desktop_plugin, "moon", "moon5.png", 400, 20, 6, 60, 60, 
                       FALSE, 100, 255, (gpointer)&change_moon, NULL);
   change_moon(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
@@ -1115,7 +1117,7 @@ init_scene1(AWallpaperPlugin *desktop_plugin)
   scene.actors = g_slist_append(scene.actors, actor);
 #endif
 
-  actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 15, 6, 60, 60, 
+  actor = init_object(desktop_plugin, "moon", "moon4.png", 400, 15, 6, 60, 60, 
                       FALSE, 100, 255, (gpointer)&change_moon, NULL);
   change_moon(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);