checked some warnings
authortanya <tanyshk@gmail.com>
Tue, 3 Aug 2010 06:42:50 +0000 (09:42 +0300)
committertanya <tanyshk@gmail.com>
Tue, 3 Aug 2010 06:42:50 +0000 (09:42 +0300)
applet/src/livewp-actor.c
applet/src/livewp-home-widget.h
applet/src/livewp-scene.c

index f3c87c4..ad6ffcd 100644 (file)
@@ -673,9 +673,7 @@ change_signal(Actor * actor, AWallpaperPlugin *desktop_plugin)
 void
 change_tape(Actor *actor, AWallpaperPlugin *desktop_plugin)
 {
-    gint x, y,
-        speed[4] = {7, 10, 5, 14}, 
-        i;
+    gint x, y, i;
     Actor *a;
 
     if (!desktop_plugin->priv->rich_animation) return;
@@ -708,18 +706,22 @@ change_tape(Actor *actor, AWallpaperPlugin *desktop_plugin)
         a = g_ptr_array_index(actor->child, i);
         if (a->scale == 100) a->scale = ang;
         if (abs(a->scale - ang) > 10){
-            if (a->scale > ang)
+            if (a->scale > ang){
                 if ((a->scale - ang) < (ang + (360-a->scale))) a->scale--;
                 else a->scale++;
-            if (a->scale < ang)
+            }
+            if (a->scale < ang) {
                 if (ang - a->scale < (a->scale+(360-ang))) a->scale++;
                 else a->scale--;
+            }
             if (a->scale > 360) a->scale = 0;
             if (a->scale < 0) a->scale = 360;
         }
     
-        x = round(a->x - (float)cos(a->scale*M_PI/180)*a->z);
-        y = round(a->y - (float)sin(a->scale*M_PI/180)*a->z);
+        x = a->x - (float)cos(a->scale*M_PI/180)*a->z;
+        y = a->y - (float)sin(a->scale*M_PI/180)*a->z;
+        //x = round(a->x - (float)cos(a->scale*M_PI/180)*a->z);
+        //y = round(a->y - (float)sin(a->scale*M_PI/180)*a->z);
         //x = a->x - cos(angle)*a->z;
         //y = a->y - sin(angle)*a->z;
         if ((a->scale > 270 || a->scale < 90) && x < -a->width*cos(a->scale*M_PI/180)){ 
index 531557c..0b4f5fd 100644 (file)
@@ -72,6 +72,7 @@ void run_long_timeout(AWallpaperPlugin *desktop_plugin);
 //void set_actor_visible(Actor *actor, gboolean visible);
 //void set_actor_scale(Actor *actor, double scalex, double scaley);
 void create_hildon_actor(Actor *actor, AWallpaperPlugin *desktop_plugin);
+void create_hildon_actor_text(Actor *actor, AWallpaperPlugin *desktop_plugin); 
 void get_sun_screen_pos(double alt, double azm, gint * x, gint * y);
 void show_settings(GtkWidget *widget, Animation_WallpaperPrivate *priv);
 void livewp_initialize_dbus(Animation_WallpaperPrivate *priv);
index bf48535..4145bdc 100644 (file)
@@ -68,10 +68,8 @@ init_scene_Accel(AWallpaperPlugin *desktop_plugin)
     GPtrArray *child;
     gint now = time(NULL);
     gchar *str;
-    gint sizes[4] = {170, 229, 130, 150}, 
-        sizes1[4] = {57, 76, 43, 50},
-        heights[4] = {0, 100, 200, 300}, 
-        n, i, j;
+    gint sizes1[4] = {57, 76, 43, 50},
+         n, j;
     
     fprintf(stderr, "init scene accel\n");
     scene = g_new0(Scene, 1);
@@ -88,16 +86,14 @@ init_scene_Accel(AWallpaperPlugin *desktop_plugin)
     
     for (j= 0; j<4; j++){
     for (n=0; n<4; n++){
-        //for (i=0; i<3; i++){
-            str = g_strdup_printf("tape%i.png", n+1);
-            actor = init_object(desktop_plugin, "tape", str,
-                                fast_rnd(800), fast_rnd(480), 2+fast_rnd(6), 800, sizes1[n],
-                                TRUE, TRUE, 100, 255,
-                                NULL, NULL, NULL);
-            scene->actors = g_slist_append(scene->actors, actor);
-            g_ptr_array_add(child, actor);
-            g_free(str);
-        //}
+        str = g_strdup_printf("tape%i.png", n+1);
+        actor = init_object(desktop_plugin, "tape", str,
+                            fast_rnd(800), fast_rnd(480), 2+fast_rnd(6), 800, sizes1[n],
+                            TRUE, TRUE, 100, 255,
+                            NULL, NULL, NULL);
+        scene->actors = g_slist_append(scene->actors, actor);
+        g_ptr_array_add(child, actor);
+        g_free(str);
     }
     }
     actor = init_object(desktop_plugin, "tape", "", 
@@ -176,10 +172,11 @@ init_scene_Xsnow(AWallpaperPlugin *desktop_plugin){
     fprintf(stderr,"init_scene_Xsnow\n");
     char* child_argv[128];
     char *run_string = NULL;
-
-//    fprintf(stderr, "PARAMETR %s\n",  desktop_plugin->priv->theme_string_parametr1);
-//    run_string = g_strdup_printf("/usr/bin/mplayer -vo x11 -wid %d %s\n", \
+#if 0
+    fprintf(stderr, "PARAMETR %s\n",  desktop_plugin->priv->theme_string_parametr1);
+    run_string = g_strdup_printf("/usr/bin/mplayer -vo x11 -wid %d %s\n", \
                                 GDK_WINDOW_XID(desktop_plugin->priv->window->window), desktop_plugin->priv->theme_string_parametr1);
+#endif
     if (!desktop_plugin->priv->visible)
         return;
     run_string= g_strdup_printf("/usr/bin/xsnow");