checked warnings, removed theme orrery
[livewp] / applet / src / fifteen.c
index 3de9265..498cc47 100644 (file)
@@ -126,24 +126,24 @@ gboolean main_timer(AWallpaperPlugin *desktop_plugin)
             moving_actor(scene->timer_num, 10, desktop_plugin);
         else 
             moving_all(scene->timer_num, 15, desktop_plugin);
-        return;
+        return TRUE;
     } 
     char * accel_filename = "/sys/class/i2c-adapter/i2c-3/3-001d/coord";
     //char * accel_filename = "/home/tanya/coord";
 
-    gint direction = -1, bone;
+    gint bone;
     FILE *fd = NULL;
-    int rs, ax, ay, az, dx, dy;
+    int rs, ax, ay, az;
     fd = fopen(accel_filename, "r");
     if (fd == NULL){
         fprintf(stderr, "cannot open file\n");
-        return;
+        return TRUE;
     }
     rs = fscanf((FILE*)fd, "%i %i %i", &ax, &ay, &az);
     fclose(fd);
     if (rs != 3){
         fprintf(stderr, "cannot read information from file\n");
-        return;
+        return TRUE;
     }
 
     //fprintf(stderr, "change obj %i %i %i\n", ax, ay, az);
@@ -210,7 +210,7 @@ void
 view_state_changed (Animation_WallpaperPrivate *priv)
 {
     if (priv->visible && priv->long_timer == 0){
-        priv->long_timer = g_timeout_add(100, main_timer, priv->desktop_plugin);
+        priv->long_timer = g_timeout_add(100, (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);
@@ -220,7 +220,10 @@ view_state_changed (Animation_WallpaperPrivate *priv)
     
 }
 gint
-read_config (Animation_WallpaperPrivate *priv){}
+read_config (Animation_WallpaperPrivate *priv)
+{
+    return 0;
+}
 void
 reload_scene(AWallpaperPlugin *desktop_plugin){}
 
@@ -230,8 +233,7 @@ int main( int   argc, char *argv[] )
     AWallpaperPlugin *desktop_plugin = g_new0 (AWallpaperPlugin, 1);
     Animation_WallpaperPrivate *priv = g_new0 (Animation_WallpaperPrivate, 1);
     scene = g_new0(Scene1, 1);
-    Actor *actor;
-    gint i, c, window_id=0, view=0;
+    gint c, window_id=0, view=0;
     gint pg[16];
 
     while ((c = getopt(argc, argv, ":v:w:")) != -1){
@@ -250,8 +252,8 @@ int main( int   argc, char *argv[] )
     g_set_application_name ("Fifteen");
     window = hildon_window_new ();
     //gtk_window_fullscreen (GTK_WINDOW(window));
-    gtk_window_set_title(window,"Fifteen");
-    gtk_window_set_wmclass(window,"Fifteen_exec","Fifteen_exec");
+    gtk_window_set_title(GTK_WINDOW(window),"Fifteen");
+    gtk_window_set_wmclass(GTK_WINDOW(window),"Fifteen_exec","Fifteen_exec");
     //window->window = window_id;
     g_signal_connect (G_OBJECT (window), "delete_event",
                         G_CALLBACK (gtk_main_quit), NULL);