modern is work, but border isn't work
authortanya <tanya@tanin.oblgaz>
Sat, 10 Apr 2010 11:23:13 +0000 (14:23 +0300)
committertanya <tanya@tanin.oblgaz>
Sat, 10 Apr 2010 11:23:13 +0000 (14:23 +0300)
applet/data/theme/Modern/border1.png
applet/data/theme/Modern/town0.png
applet/src/livewp-common.h
applet/src/livewp-home-widget.c
applet/src/livewp-rules.c

index ad9d9e2..639a01d 100755 (executable)
Binary files a/applet/data/theme/Modern/border1.png and b/applet/data/theme/Modern/border1.png differ
index 7683143..b4c258e 100755 (executable)
Binary files a/applet/data/theme/Modern/town0.png and b/applet/data/theme/Modern/town0.png differ
index a5ef9da..1102cc2 100644 (file)
@@ -36,9 +36,9 @@
 #define LONG_TIMER  10*1000 /* 10 minutes */
 enum { SHORT_TIMER_TYPE, LONG_TIMER_TYPE };
 #define SKY_LEVEL 0 
-#define SUN_LEVEL 2
-#define TOWN_LEVEL 4
-#define TRAM_LEVEL 6
+#define SUN_LEVEL 0 
+#define TOWN_LEVEL 0 
+#define TRAM_LEVEL 20 
 
 
 typedef struct _AWallpaperPlugin AWallpaperPlugin;
index 81eff43..709846f 100644 (file)
@@ -155,8 +155,11 @@ init_applet_position(void)
 void
 actor_set_position_full(GtkWidget *actor, gint x, gint y, gint z)
 {
-// fprintf(stderr, "actor_set_position_full\n");
- hildon_animation_actor_set_position_full (HILDON_ANIMATION_ACTOR (actor),x-xapplet, y-yapplet, z);
+    fprintf(stderr, "actor_set_position_full z=%d\n", z);
+    hildon_animation_actor_set_position_full (HILDON_ANIMATION_ACTOR (actor),x-xapplet, y-yapplet, z);
+    //hildon_animation_actor_set_position (HILDON_ANIMATION_ACTOR (actor),x-xapplet, y-yapplet);
+    //hildon_animation_actor_set_depth (HILDON_ANIMATION_ACTOR (actor), z);
+    
 }
 
 static gint 
@@ -512,43 +515,52 @@ fprintf(stderr, "init scene \n");
   
  
   //scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
-  actor = init_object(desktop_plugin, "sky", "sky0.png", 0, 0, SKY_LEVEL, 800, 480, 
+  actor = init_object(desktop_plugin, "sky", "sky0.png", 0, 0, 5, 800, 480, 
                       TRUE, 100, 255, &change_static_actor, NULL);
   change_static_actor(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
 
-  actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, SUN_LEVEL, 88, 88, 
+  
+  actor = init_object(desktop_plugin, "sun", "sun.png", 0, 0, 6, 88, 88, 
                       TRUE, 100, 255, &change_sun, &probability_sun);
   actor->time_start_animation = time(NULL);
   actor->duration_animation = G_MAXINT;
   change_sun(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
 
-  actor = init_object(desktop_plugin, "town", "town0.png", 0, 480-374, TOWN_LEVEL, 800, 374, 
-                      TRUE, 100, 255, &change_static_actor, NULL);
-  change_static_actor(actor, desktop_plugin);
+  actor = init_object(desktop_plugin, "dot", "dot1.png", 0, 0, 10, 50, 50, 
+                      TRUE, 100, 255, NULL, NULL);
   scene.actors = g_slist_append(scene.actors, actor);
-  
-  actor = init_object(desktop_plugin, "border", "border0.png", 0, 480-79, TOWN_LEVEL+5, 800, 79, 
+
+
+  actor = init_object(desktop_plugin, "town", "town0.png", 0, 0, 7, 800, 480, 
                       TRUE, 100, 255, &change_static_actor, NULL);
   change_static_actor(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
 
+  
+
+#if 0
   actor = init_object(desktop_plugin, "moon", "moon1.png", 400, 20, SUN_LEVEL, 60, 60, 
                       FALSE, 100, 255, &change_moon, NULL);
   change_moon(actor, desktop_plugin);
   scene.actors = g_slist_append(scene.actors, actor);
-
-
+#endif
   //if (scene.daytime == TIME_DAY) snprintf(str, 255, "tram.png");
   //else snprintf(str, 255, "tram_dark.png");
   //actor = init_object("tram", "tram.png", -300, 191, 25, 350, 210, 1, 100, 255, NULL);
   
-  actor = init_object(desktop_plugin, "tram", "tram.png", -300, 225, TRAM_LEVEL, 350, 210, 
+  actor = init_object(desktop_plugin, "tram", "tram.png", -300, 225, 8, 350, 210, 
                       FALSE, 100, 255, &change_tram, NULL);
   actor->time_start_animation = time(NULL) + 10;
   actor->duration_animation = 60;
   scene.actors = g_slist_append(scene.actors, actor);
+
+ actor = init_object(desktop_plugin, "border", "border0.png", 0, 480-79, 9, 800, 79,
+                      TRUE, 100, 255, &change_static_actor, NULL);
+//  change_static_actor(actor, desktop_plugin);
+  scene.actors = g_slist_append(scene.actors, actor);
 #if 0    
   anim = g_new0(Animation, 1);
   anim->count = 1;
index e0e7a2f..6b3ff2e 100644 (file)
@@ -89,7 +89,7 @@ void get_sun_pos(double * alt, double * azm)
     alt_max = get_max_sun_alt(lon, lat, year, month, day, zone);
     *alt = altitude(lon, lat, year, month, day, hour, min, zone);
     //printf("max = %f alt = %f ",alt_max, *alt);
-    *alt = *alt / (alt_max + 5); // sun height in percent
+    *alt = *alt / (alt_max + 10); // sun height in percent
     //printf("alt1 = %f \n", *alt);
 
     *azm = azimuth(lon, lat, year, month, day, hour, min, zone);