From: tanya Date: Tue, 7 Sep 2010 13:58:08 +0000 (+0300) Subject: changed timer values in theme fifteen X-Git-Url: http://git.maemo.org/git/?p=livewp;a=commitdiff_plain;h=ee44823d0842c7c0c50b07b76f800523a6ee59dc changed timer values in theme fifteen --- diff --git a/applet/src/fifteen.c b/applet/src/fifteen.c index 498cc47..f87e4e5 100644 --- a/applet/src/fifteen.c +++ b/applet/src/fifteen.c @@ -29,15 +29,11 @@ #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);