changed matrix behavior when rich_animation off
authortanya <tanya@tanin.oblgaz>
Mon, 26 Apr 2010 12:11:19 +0000 (15:11 +0300)
committertanya <tanya@tanin.oblgaz>
Mon, 26 Apr 2010 12:11:19 +0000 (15:11 +0300)
applet/src/livewp-home-widget.c

index e8ede24..393673b 100644 (file)
@@ -755,6 +755,8 @@ change_layer(Actor * actor, AWallpaperPlugin *desktop_plugin)
     gint y;
     Actor *a;
 
+    if (!desktop_plugin->priv->rich_animation) return;
+
     a = g_ptr_array_index(actor->child, 0);
     y = a->y + 10;
     if (y > 480) y = -480;
@@ -858,6 +860,15 @@ init_scene2(AWallpaperPlugin *desktop_plugin)
   Actor *actor;
   GPtrArray *child;
   gint now = time(NULL);
+  gint y1, y2;
+
+  if (desktop_plugin->priv->rich_animation){
+      y1 = -480;
+      y2 = -480-480;
+  }else {
+      y1 = 0;
+      y2 = -480;
+  }
 
   fprintf(stderr, "init scene2 \n");
   //scene.daytime = get_daytime();
@@ -878,7 +889,7 @@ init_scene2(AWallpaperPlugin *desktop_plugin)
 
   child = g_ptr_array_sized_new(4);
   actor = init_object(desktop_plugin, "layer1", "layer1_2.png", 
-                      0, -480, 6, 800, 960, 
+                      0, y1, 6, 800, 960, 
                       TRUE, TRUE, 100, 255, 
                       NULL, NULL, NULL);
   //actor->time_start_animation = now;
@@ -887,7 +898,7 @@ init_scene2(AWallpaperPlugin *desktop_plugin)
   g_ptr_array_add(child, actor);
 
   actor = init_object(desktop_plugin, "layer1", "layer1_1.png", 
-                      0, (-480 - 480), 7, 800, 960, 
+                      0, y2, 7, 800, 960, 
                       TRUE, TRUE, 100, 255, 
                       NULL, NULL, NULL);
   //actor->time_start_animation = now;
@@ -896,7 +907,7 @@ init_scene2(AWallpaperPlugin *desktop_plugin)
   g_ptr_array_add(child, actor);
 
   actor = init_object(desktop_plugin, "layer2", "layer2_2.png", 
-                      0, -480, 8, 800, 960, 
+                      0, y1, 8, 800, 960, 
                       TRUE, TRUE, 100, 255, 
                       NULL, NULL, NULL);
   //actor->time_start_animation = now;
@@ -905,7 +916,7 @@ init_scene2(AWallpaperPlugin *desktop_plugin)
   g_ptr_array_add(child, actor);
 
   actor = init_object(desktop_plugin, "layer2", "layer2_1.png", 
-                      0, (-480 - 480), 9, 800, 960, 
+                      0, y2, 9, 800, 960, 
                       TRUE, TRUE, 100, 255, 
                       NULL, NULL, NULL);
   //actor->time_start_animation = now;
@@ -914,7 +925,7 @@ init_scene2(AWallpaperPlugin *desktop_plugin)
   g_ptr_array_add(child, actor);
 
   actor = init_object(desktop_plugin, "layers", "", 
-                      0, (-480 - 480), 9, 800, 960, 
+                      0, y2, 9, 800, 960, 
                       FALSE, FALSE, 100, 255, 
                       (gpointer)&change_layer, NULL, child);
   actor->time_start_animation = now;