changed timer values in theme fifteen
authortanya <tanyshk@gmail.com>
Tue, 7 Sep 2010 13:58:08 +0000 (16:58 +0300)
committertanya <tanyshk@gmail.com>
Tue, 7 Sep 2010 13:58:08 +0000 (16:58 +0300)
applet/src/fifteen.c

index 498cc47..f87e4e5 100644 (file)
 #include "livewp-actor.h"
 #include "livewp-dbus.h"
 
-enum {
-    UP = 0,
-    RIGHT = 1,
-    DOWN = 2,
-    LEFT = 3
-};
-
 const gint width = 110;
 const gint height = 110;
+const gint timeout = 50; 
+const gint time_bone = 15; 
+const gint time_reload = 20; 
 
 typedef struct _Scene1 Scene1;
 struct _Scene1 
@@ -123,9 +119,9 @@ gboolean main_timer(AWallpaperPlugin *desktop_plugin)
     if (scene->timer_num > 0){
         scene->timer_num--;
         if (scene->bone>-1)
-            moving_actor(scene->timer_num, 10, desktop_plugin);
+            moving_actor(scene->timer_num, time_bone, desktop_plugin);
         else 
-            moving_all(scene->timer_num, 15, desktop_plugin);
+            moving_all(scene->timer_num, time_reload, desktop_plugin);
         return TRUE;
     } 
     char * accel_filename = "/sys/class/i2c-adapter/i2c-3/3-001d/coord";
@@ -150,7 +146,7 @@ gboolean main_timer(AWallpaperPlugin *desktop_plugin)
     if (az < -2000) {
         //reinit(desktop_plugin);
         //sleep(1);
-        scene->timer_num = 15;
+        scene->timer_num = time_reload;
         scene->bone = -1;
         return TRUE;
     }
@@ -180,7 +176,7 @@ gboolean main_timer(AWallpaperPlugin *desktop_plugin)
     } else return TRUE;
     //fprintf(stderr, "move %d\n", bone);
     scene->bone = bone;
-    scene->timer_num = 10;
+    scene->timer_num = time_bone;
         
     return TRUE;
 }
@@ -210,7 +206,7 @@ void
 view_state_changed (Animation_WallpaperPrivate *priv)
 {
     if (priv->visible && priv->long_timer == 0){
-        priv->long_timer = g_timeout_add(100, (GtkFunction)main_timer, priv->desktop_plugin);
+        priv->long_timer = g_timeout_add(timeout, (GtkFunction)main_timer, priv->desktop_plugin);
         //fprintf(stderr, "visible = 1 timeout_add %d\n", priv->long_timer);
     }else {
         //fprintf(stderr, "visible = 0 timer remove %d\n", priv->long_timer);