fixed warnings
authortanya <tanyshk@gmail.com>
Mon, 16 Aug 2010 07:20:46 +0000 (10:20 +0300)
committertanya <tanyshk@gmail.com>
Mon, 16 Aug 2010 07:20:46 +0000 (10:20 +0300)
applet/src/livewp-config.h
applet/src/livewp-exthemes.c
applet/src/livewp-scene.c
applet/src/livewp-scene.h
applet/src/livewp-settings.c

index 61ea619..058fff5 100644 (file)
@@ -42,4 +42,5 @@ gint read_config(Animation_WallpaperPrivate *priv);
 void save_config(Animation_WallpaperPrivate *priv); 
 void fill_priv(Animation_WallpaperPrivate *priv);
 gint current_active_view(void);
+GSList * get_list_exthemes(void);
 #endif
index 84b9256..0876279 100644 (file)
@@ -40,7 +40,7 @@ parse_theme(gchar *file){
         //}
         if (node->type == XML_ELEMENT_NODE){ 
             //fprintf(stderr, "%s => %s\n", node->name, xmlNodeGetContent(node));
-            g_hash_table_insert(hash, g_strdup(node->name), g_strdup(xmlNodeGetContent(node)));
+            g_hash_table_insert(hash, g_strdup((gchar*)node->name), g_strdup((gchar*)xmlNodeGetContent(node)));
         }
     }
     if (!(g_hash_table_lookup(hash, "category")))
@@ -79,6 +79,6 @@ get_list_exthemes(void){
         }
         closedir(dir_fd);
     }
-    store = g_slist_sort(store, compar);
+    store = g_slist_sort(store, (GCompareFunc)compar);
     return store;
 }
index 86cd0d9..496ea47 100644 (file)
@@ -49,7 +49,6 @@ destroy_scene(AWallpaperPlugin *desktop_plugin)
         desktop_plugin->priv->pipeline = NULL;
     }
     if (desktop_plugin->priv->podpid > 1){
-        fprintf(stderr, "rrrrrrr\n");
         kill (desktop_plugin->priv->podpid, SIGTERM);
         while (TRUE){
             if (wait(&status) == desktop_plugin->priv->podpid) 
@@ -198,7 +197,7 @@ init_scene_External(AWallpaperPlugin *desktop_plugin){
     if (!exec_path) 
         return;
     if (window_id){
-        strwin = g_strdup_printf(" %s %i", window_id, GDK_WINDOW_XID(desktop_plugin->priv->window->window));
+        strwin = g_strdup_printf(" %s %i", window_id, (gint)GDK_WINDOW_XID(desktop_plugin->priv->window->window));
     }else
         strwin = "";
 
index fe0f6df..1bb0fe1 100644 (file)
 #include "livewp-common.h"
 #include "livewp-actor.h" 
 #include <sys/time.h>
+#include <sys/wait.h>
 #include "livewp-rules.h"
 #include <glib-object.h>
 #include <unistd.h>
 
 
+void fill_priv(Animation_WallpaperPrivate *priv);
 void destroy_scene(AWallpaperPlugin *desktop_plugin);
 void reload_scene(AWallpaperPlugin *desktop_plugin);
 void run_long_timeout(AWallpaperPlugin *desktop_plugin);
index af04973..03ecd84 100644 (file)
@@ -59,13 +59,11 @@ create_category_selector (Animation_WallpaperPrivate *priv){
     GSList *store = priv->extheme_list;
     GList *category_list;
     GHashTable *result_table = NULL;
-    GtkListStore *list = NULL;
-    HildonTouchSelectorColumn *column = NULL;
 
     result_table = g_hash_table_new(g_str_hash, g_str_equal);
     while (store){  
         if (!g_hash_table_lookup(result_table, g_hash_table_lookup(store->data, "category")))
-            g_hash_table_insert(result_table, g_hash_table_lookup(store->data, "category"), 1);     
+            g_hash_table_insert(result_table, g_hash_table_lookup(store->data, "category"), (gint *)1);     
         store = g_slist_next(store);
     }
 
@@ -102,7 +100,7 @@ set_button_image(GtkWidget * button, Animation_WallpaperPrivate *priv, gboolean
             icon_off = g_strdup(g_hash_table_lookup(store->data, "icon_off"));
             break;
         }
-        store = g_list_next(store);
+        store = (GSList *)g_list_next(store);
     }
     if (enable){
         if (icon_on)
@@ -196,7 +194,6 @@ changed_value_theme_cb (HildonPickerButton *picker, Animation_WallpaperPrivate *
 void
 changed_value_category_cb (HildonPickerButton *picker, Animation_WallpaperPrivate *priv)
 {
-    const gchar *choice = hildon_button_get_value(HILDON_BUTTON (picker));
     GtkWidget *theme_button = NULL;
 
     theme_button = g_object_get_data(G_OBJECT(priv->window), "theme_button");
@@ -204,8 +201,8 @@ changed_value_category_cb (HildonPickerButton *picker, Animation_WallpaperPrivat
         return;
     HildonTouchSelector * selector =  hildon_picker_button_get_selector((HildonPickerButton *) theme_button);
     hildon_touch_selector_remove_column(selector, 0); 
-    hildon_touch_selector_append_text_column(selector, gtk_list_store_new (1, G_TYPE_STRING), TRUE);
-    fill_theme_button(priv, theme_button, hildon_button_get_value(HILDON_BUTTON (picker)));
+    hildon_touch_selector_append_text_column(selector, (GtkTreeModel*)gtk_list_store_new (1, G_TYPE_STRING), TRUE);
+    fill_theme_button(priv, theme_button, (gchar *)hildon_button_get_value(HILDON_BUTTON (picker)));
 }
 /********************************************************************************/
 void
@@ -213,7 +210,7 @@ fill_theme_button (Animation_WallpaperPrivate *priv, GtkWidget *button, gchar *c
 
     gchar *theme = priv->theme;
     gint num=0;
-        hildon_button_set_value(HILDON_PICKER_BUTTON (button), NULL);
+        hildon_button_set_value(HILDON_BUTTON (button), NULL);
     if (!category){
         changed_value_theme_cb(HILDON_PICKER_BUTTON (button), priv);
         return;
@@ -221,7 +218,7 @@ fill_theme_button (Animation_WallpaperPrivate *priv, GtkWidget *button, gchar *c
     GSList *store = priv->extheme_list;
     HildonTouchSelector * selector =  hildon_picker_button_get_selector((HildonPickerButton *) button);
     if (!selector)
-        selector = hildon_touch_selector_new_text ();
+        selector = (HildonTouchSelector *)hildon_touch_selector_new_text ();
     
     hildon_button_set_value(HILDON_BUTTON(button), NULL);
     if (!strcmp(category, "LiveWallpaper")){
@@ -324,13 +321,13 @@ create_categories_button (Animation_WallpaperPrivate *priv){
         GSList *store = priv->extheme_list;
         while (store){
             if (!g_hash_table_lookup(result_table, g_hash_table_lookup(store->data, "category"))){
-                g_hash_table_insert(result_table, g_hash_table_lookup(store->data, "category"), num);     
+                g_hash_table_insert(result_table, g_hash_table_lookup(store->data, "category"), (gint *)num);     
                 num++;
             }
             if (!strcmp(theme, g_hash_table_lookup(store->data, "name"))){
                 if (g_hash_table_lookup(store->data, "category"))
                     hildon_button_set_value(HILDON_BUTTON(button), _(g_hash_table_lookup(store->data, "category")));
-                    hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, g_hash_table_lookup(result_table, g_hash_table_lookup(store->data, "category"))); 
+                    hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, (gint)g_hash_table_lookup(result_table, g_hash_table_lookup(store->data, "category"))); 
                 break;
             }
 
@@ -538,12 +535,12 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     g_object_set_data(G_OBJECT(window), "custom_vbox", vbox);
 
     /* Create Theme button */
-    theme_button = create_themes_button(priv,hildon_button_get_value(HILDON_BUTTON (category_button)));
+    theme_button = create_themes_button(priv, (gchar *)hildon_button_get_value(HILDON_BUTTON (category_button)));
     g_object_set_data(G_OBJECT(window), "theme_button", theme_button);
     g_signal_connect (G_OBJECT (theme_button), "value-changed",  G_CALLBACK (changed_value_theme_cb), priv);
     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox),
                                    theme_button, TRUE, TRUE, 5);
-    fill_theme_button(priv, theme_button, hildon_button_get_value(HILDON_BUTTON (category_button)));
+    fill_theme_button(priv, theme_button, (gchar *)hildon_button_get_value(HILDON_BUTTON (category_button)));
 
     /* Pack custom vbox. It must be last widget */
     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox),