cleaned code
authorVlad Vasiliev <vlad@toshiba2.oblgaz>
Sat, 27 Mar 2010 19:45:18 +0000 (21:45 +0200)
committerVlad Vasiliev <vlad@toshiba2.oblgaz>
Sat, 27 Mar 2010 19:45:18 +0000 (21:45 +0200)
applet/debian/files [deleted file]
applet/src/livewp-home-widget.c
applet/src/livewp-home-widget.h

diff --git a/applet/debian/files b/applet/debian/files
deleted file mode 100644 (file)
index 34f75ca..0000000
+++ /dev/null
@@ -1 +0,0 @@
-live-wallpaper_0.1_i386.deb user/desktop optional
index 5c2ae03..ae290ca 100644 (file)
@@ -25,7 +25,6 @@
 #include <gtk/gtk.h>
 #include <hildon/hildon.h>
 #include "livewp-home-widget.h"
-#include <libhildondesktop/libhildondesktop.h>
 #include <gconf/gconf-client.h>
 #include "livewp-rules.h"
 
@@ -38,10 +37,6 @@ HD_DEFINE_PLUGIN_MODULE (AWallpaperPlugin, animation_wallpaper_plugin, HD_TYPE_H
 #define Animation_Wallpaper_HOME_PLUGIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE (obj,\
                                                           Animation_Wallpaper_TYPE_HOME_PLUGIN,\
                                                           Animation_WallpaperPrivate))
-struct _Animation_WallpaperPrivate
-{
-      gpointer data;
-};
 
 
 /* Position of plugin on desktop */
@@ -89,7 +84,7 @@ lw_applet_expose_event(GtkWidget      *widget,
                                                                                   event);
 }
 
-gboolean
+static gboolean
 expose_event (GtkWidget *widget,GdkEventExpose *event,
      gpointer data)
 {
@@ -105,7 +100,7 @@ expose_event (GtkWidget *widget,GdkEventExpose *event,
     return TRUE;
 }
 
-void
+static void
 realize (GtkWidget *widget)
 {
     GdkScreen *screen;
@@ -113,8 +108,8 @@ realize (GtkWidget *widget)
     gtk_widget_set_colormap (widget, gdk_screen_get_rgba_colormap (screen));
 }
 
-/* set position of widget on desktop */
-void
+/* Set position of widget on desktop */
+static void
 init_applet_position(void)
 {
   GSList *position = NULL;
@@ -154,13 +149,15 @@ init_applet_position(void)
   g_object_unref(gconf_client);
 }
 
+static void
 actor_set_position_full(GtkWidget *actor, gint x, gint y, gint z)
 {
  fprintf(stderr, "actor_set_position_full\n");
  hildon_animation_actor_set_position_full (HILDON_ANIMATION_ACTOR (actor),x-xapplet, y-yapplet, z);
 }
 
-GtkWidget* init_object(gchar * name, gint x, gint y, gint z, gint width, gint height)
+static GtkWidget* 
+init_object(gchar * name, gint x, gint y, gint z, gint width, gint height)
 {
   Actor  a;  
   GtkWidget *actor;
@@ -170,7 +167,7 @@ GtkWidget* init_object(gchar * name, gint x, gint y, gint z, gint width, gint he
   actor = hildon_animation_actor_new();
   gchar str[256];
   snprintf(str, 255, "/usr/share/anwall/%s.png", name);
-  //fprintf(stderr, "!!!init object !!!!\nname = %s file = %s\n", name, str);
+  /* fprintf(stderr, "!!!init object !!!!\nname = %s file = %s\n", name, str); */
   pixbuf = gdk_pixbuf_new_from_file_at_size (str, 
                                              width, 
                                              height, 
@@ -211,7 +208,7 @@ GtkWidget* init_object(gchar * name, gint x, gint y, gint z, gint width, gint he
   return actor;
 }
 
-void
+static void
 init_scene(GtkWidget *window)
 {
   GtkWidget *actor;
@@ -247,11 +244,8 @@ init_scene(GtkWidget *window)
 
 }
 
-static void
-example_label_home_applet_realize (GtkWidget *widget)
-{
-}
-void get_sun_screen_pos(double alt, double azm, gint * x, gint * y)
+static void 
+get_sun_screen_pos(double alt, double azm, gint * x, gint * y)
 {
     gint y0 = 400;// - уровень горизонта
     gint o_width = 128,
@@ -260,7 +254,8 @@ void get_sun_screen_pos(double alt, double azm, gint * x, gint * y)
     *y = (int)((1 - alt) * y0) - 64;
 }
 
-void change_actor(GtkWidget * actor)
+static void 
+change_actor(GtkWidget * actor)
 {
     char * name;
     gint x, y, daytime, sc;
@@ -310,10 +305,10 @@ plugin_on_timeout (gpointer data)
   fprintf(stderr, "on timeout\n");
 
   if (scene.daytime == daytime){
-      // change dynamic actors
+      /* Change dynamic actors */
       tmp = scene.dynamic_actors;
   }else {
-      // change static actors
+      /* Change static actors */
       tmp = scene.dynamic_actors;
   } 
   while (tmp != NULL){
index 35b362d..3688aab 100644 (file)
@@ -90,4 +90,9 @@ GType animation_wallpaper_home_plugin_get_type(void);
 
 G_END_DECLS
 
+struct _Animation_WallpaperPrivate
+{
+      gpointer data;
+};
+
 #endif