added new layers in theme Matrix
authortanya <tanya@tanin.oblgaz>
Mon, 19 Apr 2010 13:34:10 +0000 (16:34 +0300)
committertanya <tanya@tanin.oblgaz>
Mon, 19 Apr 2010 13:34:10 +0000 (16:34 +0300)
1  2 
applet/data/theme/Matrix/corner.png
applet/data/theme/Matrix/layer1_1.png
applet/data/theme/Matrix/layer1_2.png
applet/data/theme/Matrix/layer2_1.png
applet/data/theme/Matrix/layer2_2.png
applet/data/theme/Matrix/symbols_without.png
applet/src/livewp-home-widget.c

index 0000000,0000000..48b5f14
new file mode 100644 (file)
Binary files differ
index 0000000,1967d0e..4463334
mode 000000,100644..100644
Binary files differ
index 0000000,0000000..77c0196
new file mode 100644 (file)
Binary files differ
index 0000000,9bc3315..b02790e
mode 000000,100644..100644
Binary files differ
index 0000000,0000000..e481f10
new file mode 100644 (file)
Binary files differ
index 0000000,0000000..83ad76e
new file mode 100644 (file)
Binary files differ
@@@ -754,6 -693,27 +693,27 @@@ change_static_actor_with_corner(Actor 
  
  }
  
+ void
+ change_layer1(Actor * actor, AWallpaperPlugin *desktop_plugin)
+ {
+     gint y;
 -    y = actor->y + 20;
++    y = actor->y + 10;
+     if (y > 480) y = -480;
+     //fprintf(stderr, "!! %s - %d\n", actor->name, y);
+     actor_set_position_full(actor->widget, actor->x, y, actor->z);
+     actor->y = y;
+ }
+ void
+ change_layer2(Actor * actor, AWallpaperPlugin *desktop_plugin)
+ {
+     gint y;
 -    y = actor->y + 30;
++    y = actor->y + 15;
+     if (y >= 480) y = -480;
+     //fprintf(stderr, "!! %s - %d\n", actor->name, y);
+     actor_set_position_full(actor->widget, actor->x, y, actor->z);
+     actor->y = y;
+ }
  
  /*
  static gint 
@@@ -792,9 -752,69 +752,66 @@@ reload_scene(AWallpaperPlugin *desktop_
          init_scene(desktop_plugin);
      else if (!strcmp(desktop_plugin->priv->theme,"Berlin")) 
          init_scene1(desktop_plugin);
+     else if (!strcmp(desktop_plugin->priv->theme,"Matrix")) 
+         init_scene2(desktop_plugin);
  }
  
+ static void
+ init_scene2(AWallpaperPlugin *desktop_plugin)
+ {
+   Actor *actor;
+   gint now = time(NULL);
+   /* fprintf(stderr, "init scene \n");*/
+   scene.daytime = get_daytime();
+   scene.actors = NULL;
 -  scene.wind_orientation = -1;
 -  scene.wind_angle = 0.3;
 -  /* init value for random */
 -  scene.seed = time(NULL);
+   
+   actor = init_object(desktop_plugin, "background", "bg.png", 
+                       0, 0, 5, 800, 480, 
+                       TRUE, 100, 255, NULL, NULL);
+   scene.actors = g_slist_append(scene.actors, actor);
 -  actor = init_object(desktop_plugin, "layer1", "layer1_0.png", 
 -                      0, -480, 6, 800, 1920, 
++  actor = init_object(desktop_plugin, "symbols", "symbols.png", 
++                      0, 0, 10, 800, 480, 
++                      TRUE, 100, 255, NULL, NULL);
++  scene.actors = g_slist_append(scene.actors, actor);
++
++  actor = init_object(desktop_plugin, "layer1", "layer1_2.png", 
++                      0, -480, 6, 800, 960, 
+                       TRUE, 100, 255, (gpointer)&change_layer1, NULL);
+   actor->time_start_animation = now;
+   actor->duration_animation = G_MAXINT;
+   scene.actors = g_slist_append(scene.actors, actor);
+   actor = init_object(desktop_plugin, "layer1", "layer1_1.png", 
 -                      0, (-480 - 480), 6, 800, 1920, 
++                      0, (-480 - 480), 7, 800, 960, 
+                       TRUE, 100, 255, (gpointer)&change_layer1, NULL);
+   actor->time_start_animation = now;
+   actor->duration_animation = G_MAXINT;
+   scene.actors = g_slist_append(scene.actors, actor);
 -  actor = init_object(desktop_plugin, "layer2", "layer2_0.png", 
 -                      0, -480, 7, 800, 2640, 
++  actor = init_object(desktop_plugin, "layer2", "layer2_2.png", 
++                      0, -480, 8, 800, 960, 
+                       TRUE, 100, 255, (gpointer)&change_layer2, NULL);
+   actor->time_start_animation = now;
+   actor->duration_animation = G_MAXINT;
+   scene.actors = g_slist_append(scene.actors, actor);
  
+   actor = init_object(desktop_plugin, "layer2", "layer2_1.png", 
 -                      0, -480 - 480, 7, 800, 2640, 
++                      0, (-480 - 480), 9, 800, 960, 
+                       TRUE, 100, 255, (gpointer)&change_layer2, NULL);
+   actor->time_start_animation = now;
+   actor->duration_animation = G_MAXINT;
+   scene.actors = g_slist_append(scene.actors, actor);
 -  actor = init_object(desktop_plugin, "symbols", "symbols.png", 
 -                      0, 0, 8, 800, 480, 
 -                      TRUE, 100, 255, NULL, NULL);
 -  scene.actors = g_slist_append(scene.actors, actor);
 -  
++    
+     run_long_timeout(desktop_plugin);
+ }
  /* Init Modern Scene */
  static void
  init_scene(AWallpaperPlugin *desktop_plugin)
@@@ -1310,14 -1330,8 +1327,8 @@@ short_timeout (AWallpaperPlugin *deskto
      time_t now;
      Actor *actor;
      gboolean stop_flag = TRUE;
-     
-         min ++;
-         if (min == 60){
-             hour ++;
-             min = 0;
-             if (hour == 23) hour = 0;
-         }
-     if (!desktop_plugin->priv->visible || !desktop_plugin->priv->rich_animation){
 -    if (!desktop_plugin->priv->visible || !desktop_plugin->priv->rich_animation){
++if (!desktop_plugin->priv->visible || !desktop_plugin->priv->rich_animation){
          desktop_plugin->priv->short_timer = 0;
          return FALSE;
      }