added in xml check_path and install_file, tried open .install file in the browser
authortanya <tanyshk@gmail.com>
Fri, 17 Sep 2010 12:37:04 +0000 (15:37 +0300)
committertanya <tanyshk@gmail.com>
Fri, 17 Sep 2010 12:37:04 +0000 (15:37 +0300)
applet/data/external_themes/100boxes.xml
applet/data/external_themes/colorflood.xml
applet/data/external_themes/conky.xml
applet/data/external_themes/crazychikens.xml
applet/data/external_themes/orrery.xml.disable
applet/data/external_themes/xsnow2.xml
applet/data/theme/Conky/conky.install [new file with mode: 0644]
applet/src/livewp-settings.c

index 41286cf..dee8143 100644 (file)
@@ -1,6 +1,6 @@
 <theme>
     <name>100Boxes</name>
     <exec_path>/usr/bin/100boxes -l</exec_path>
-    <window_name>100boxes</window_name>
+    <window_name>100boxes_exec</window_name>
     <category>Game</category>
 </theme>
index 84f2d98..b0b62c2 100644 (file)
@@ -5,4 +5,5 @@
  <category>Game</category>
  <icon_on>/usr/share/livewp/theme/Colorflood/icon.png</icon_on>
  <icon_off>/usr/share/livewp/theme/Colorflood/icond.png</icon_off>
+ <check_path>/usr/bin/colorflood</check_path>
 </theme>
index dce4b76..507d8f6 100644 (file)
@@ -4,5 +4,7 @@
     <category>Unknown</category>
     <icon_on>/usr/share/livewp/theme/Conky/icon.png</icon_on>       
     <icon_off>/usr/share/livewp/theme/Conky/icond.png</icon_off>       
-    <window_id>-w</window_id>                                                                               
+    <window_id>-w</window_id>
+    <check_path>/usr/bin/conky</check_path>
+    <install_file>/usr/share/livewp/theme/Conky/conky.install</install_file>                                                                               
 </theme>
index e3926cf..712d511 100644 (file)
@@ -6,4 +6,5 @@
     <icon_on>/usr/share/livewp/theme/CrazyChickens/icon.png</icon_on>       
     <icon_off>/usr/share/livewp/theme/CrazyChickens/icond.png</icon_off>       
     <view>--livewallpaper</view>
+    <check_path>/usr/bin/crazychickens</check_path>
 </theme>
index 689a418..5253295 100644 (file)
@@ -4,5 +4,6 @@
  <window_name>orrery</window_name>
  <category>Unknown</category>
  <icon_on>/usr/share/livewp/theme/Orrery/icon.png</icon_on>       
- <icon_off>/usr/share/livewp/theme/Orrery/icond.png</icon_off>       
+ <icon_off>/usr/share/livewp/theme/Orrery/icond.png</icon_off> 
+ <check_path>/opt/maemo/usr/bin/orrery</check_path>      
 </theme>
index b95d95b..8b9c012 100644 (file)
@@ -3,5 +3,6 @@
     <exec_path>/usr/bin/xsnow</exec_path>
     <category>Unknown</category>
      <icon_on>/usr/share/livewp/theme/Xsnow/icon.png</icon_on>       
-     <icon_off>/usr/share/livewp/theme/Xsnow/icond.png</icon_off>       
+     <icon_off>/usr/share/livewp/theme/Xsnow/icond.png</icon_off>     
+    <check_path>/usr/bin/xsnow</check_path>   
 </theme>
diff --git a/applet/data/theme/Conky/conky.install b/applet/data/theme/Conky/conky.install
new file mode 100644 (file)
index 0000000..6841bc2
--- /dev/null
@@ -0,0 +1,8 @@
+[install]
+catalogues = extras
+package = conky
+
+[extras]
+name = Maemo Extras
+uri = http://repository.maemo.org/extras/
+components = free non-free
index b1be895..01e3bfc 100644 (file)
@@ -1,21 +1,21 @@
 /* vim: set sw=4 ts=4 et: */
 /*
  * This file is part of Live Wallpaper (livewp)
- * 
+ *
  * Copyright (C) 2010 Vlad Vasiliev
  * Copyright (C) 2010 Tanya Makova
  *       for the code
- * 
+ *
  * This software is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2 of
  * the License, or (at your option) any later version.
- * 
+ *
  * This software is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
@@ -25,7 +25,7 @@
 #include "livewp-settings.h"
 /*******************************************************************************/
 void lw_about(void){
-    
+
     gchar *about_string;
     GtkWidget *window = NULL,
     *vbox = NULL,
@@ -69,14 +69,14 @@ create_category_selector (Animation_WallpaperPrivate *priv){
     hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), "LiveWallpaper" );
 
     result_table = g_hash_table_new(g_str_hash, g_str_equal);
-    while (store){  
+    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"), (gint *)1);     
+            g_hash_table_insert(result_table, g_hash_table_lookup(store->data, "category"), (gint *)1);
             hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), g_hash_table_lookup(store->data, "category"));
         }
         store = g_slist_next(store);
     }
-    
+
     /* Add Xscreensaver for install message */
     if (!g_hash_table_lookup(result_table,"Xscreensaver")){
             g_hash_table_insert(result_table, "Xscreensaver", (gint *)1);
@@ -93,7 +93,7 @@ theme_button_clicked(GtkWidget *button, GdkEventButton *event, Animation_Wallpap
 /********************************************************************************/
 void
 set_button_image(GtkWidget * button, Animation_WallpaperPrivate *priv, gboolean enable){
-    GtkWidget * image = NULL; 
+    GtkWidget * image = NULL;
     GdkPixbuf * pixbuf = NULL;
     gchar *str = NULL;
     gchar *icon_on = NULL;
@@ -111,30 +111,30 @@ set_button_image(GtkWidget * button, Animation_WallpaperPrivate *priv, gboolean
     if (enable){
         if (icon_on)
             str = g_strdup_printf("%s", icon_on);
-        else 
-            str = g_strdup_printf( "%s/%s/%s", THEME_PATH, 
+        else
+            str = g_strdup_printf( "%s/%s/%s", THEME_PATH,
                             priv->theme, "icon.png");
             if (access(str, F_OK) != 0){
                 g_free(str);
-                str = g_strdup_printf( "%s/%s/%s", THEME_PATH, 
+                str = g_strdup_printf( "%s/%s/%s", THEME_PATH,
                             "Video", "icon.png");
             }
 
     }else {
         if (icon_off)
             str = g_strdup_printf("%s", icon_off);
-        else 
-            str = g_strdup_printf( "%s/%s/%s", THEME_PATH, 
+        else
+            str = g_strdup_printf( "%s/%s/%s", THEME_PATH,
                             priv->theme, "icond.png");
             if (access(str, F_OK) != 0){
                 g_free(str);
-                str = g_strdup_printf( "%s/%s/%s", THEME_PATH, 
+                str = g_strdup_printf( "%s/%s/%s", THEME_PATH,
                             "Video", "icond.png");
             }
     }
-    pixbuf = gdk_pixbuf_new_from_file_at_size (str, 
-                                                 124, 
-                                                 79, 
+    pixbuf = gdk_pixbuf_new_from_file_at_size (str,
+                                                 124,
+                                                 79,
                                                  NULL);
     if (str)
         g_free(str);
@@ -203,7 +203,7 @@ changed_value_theme_cb (HildonPickerButton *picker, Animation_WallpaperPrivate *
     const gchar *choice = hildon_button_get_value(HILDON_BUTTON (picker));
     GtkWidget *vbox = NULL;
     GtkWidget *area_vbox = NULL;
-        
+
     area_vbox = g_object_get_data(G_OBJECT(priv->window), "area_vbox");
     if (!area_vbox)
         return;
@@ -243,10 +243,10 @@ changed_value_category_cb (HildonPickerButton *picker, Animation_WallpaperPrivat
     const gchar *choice = hildon_button_get_value(HILDON_BUTTON (picker));
 
     theme_button = g_object_get_data(G_OBJECT(priv->window), "theme_button");
-    if (!theme_button) 
+    if (!theme_button)
         return;
     HildonTouchSelector * selector =  hildon_picker_button_get_selector((HildonPickerButton *) theme_button);
-    hildon_touch_selector_remove_column(selector, 0); 
+    hildon_touch_selector_remove_column(selector, 0);
     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)));
     /* check xscreensaver category */
@@ -274,7 +274,7 @@ fill_theme_button (Animation_WallpaperPrivate *priv, GtkWidget *button, gchar *c
     HildonTouchSelector * selector =  hildon_picker_button_get_selector((HildonPickerButton *) button);
     if (!selector)
         selector = (HildonTouchSelector *)hildon_touch_selector_new_text ();
-    
+
     hildon_button_set_value(HILDON_BUTTON(button), NULL);
     if (!strcmp(category, "LiveWallpaper")){
         hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Berlin"));
@@ -282,8 +282,8 @@ fill_theme_button (Animation_WallpaperPrivate *priv, GtkWidget *button, gchar *c
         hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Matrix"));
         hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Accel"));
         hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Video"));
-        num = 5;        
-        if (theme){ 
+        num = 5;
+        if (theme){
             if (!strcmp(theme, "Berlin")){
                 hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0);
                 hildon_button_set_value(HILDON_BUTTON(button), _("Berlin"));
@@ -306,7 +306,7 @@ fill_theme_button (Animation_WallpaperPrivate *priv, GtkWidget *button, gchar *c
             }
        }
     }
-    while (store){  
+    while (store){
         if (!g_hash_table_lookup(store->data, "category"))
             continue;
         if (!strcmp(g_hash_table_lookup(store->data, "category"), category)){
@@ -322,7 +322,7 @@ fill_theme_button (Animation_WallpaperPrivate *priv, GtkWidget *button, gchar *c
     /* Added Shreman's Aquarium for message */
     if (!strcmp(category, "Unknown")){
         store = priv->extheme_list;
-        while (store){  
+        while (store){
             if (!strcmp("Shermans Aquarium" , g_hash_table_lookup(store->data, "name"))){
                 flag = TRUE;
                 break;
@@ -346,7 +346,7 @@ create_themes_button (Animation_WallpaperPrivate *priv, gchar *category){
     button = hildon_picker_button_new (HILDON_SIZE_FINGER_HEIGHT, HILDON_BUTTON_ARRANGEMENT_VERTICAL);
     hildon_button_set_title (HILDON_BUTTON (button), _("Theme"));
 
-   
+
     return button;
 }
 /********************************************************************************/
@@ -367,36 +367,36 @@ create_categories_button (Animation_WallpaperPrivate *priv){
                                                        HILDON_TOUCH_SELECTOR (selector));
     if (theme) {
         if (!strcmp(theme, "Berlin")){
-            hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0); 
+            hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0);
             hildon_button_set_value(HILDON_BUTTON(button), "LiveWallpaper");
         }
         if (!strcmp(theme, "Modern")){
-            hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0); 
+            hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0);
             hildon_button_set_value(HILDON_BUTTON(button), "LiveWallpaper");
         }
         if (!strcmp(theme, "Matrix")){
-            hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0); 
+            hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0);
             hildon_button_set_value(HILDON_BUTTON(button), "LiveWallpaper");
         }
         if (!strcmp(theme, "Accel")){
-            hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0); 
+            hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0);
             hildon_button_set_value(HILDON_BUTTON(button), "LiveWallpaper");
         }
         if (!strcmp(theme, "Video")){
-            hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0); 
+            hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 0);
             hildon_button_set_value(HILDON_BUTTON(button), "LiveWallpaper");
         }
         GSList *store = priv->extheme_list;
         num = 1;
         while (store){
             if (g_hash_table_lookup(result_table, g_hash_table_lookup(store->data, "category")) == NULL){
-                g_hash_table_insert(result_table, g_hash_table_lookup(store->data, "category"), (gint *)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_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 
-                    (gint)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")));
                     hildon_button_set_value(HILDON_BUTTON(button), g_hash_table_lookup(store->data, "category"));
                 }
                 break;
@@ -442,9 +442,9 @@ create_themes_buttons_hbox(Animation_WallpaperPrivate *priv){
     GtkWidget *theme_button1;
     GtkWidget *theme_button2;
     GtkWidget *theme_button3;
-    GtkWidget *theme_button4;    
+    GtkWidget *theme_button4;
+
 
-        
     area_hbox = g_object_get_data(G_OBJECT(priv->window), "area_hbox");
     if (!area_hbox)
         return;
@@ -476,16 +476,16 @@ create_themes_buttons_hbox(Animation_WallpaperPrivate *priv){
     gtk_box_pack_start(GTK_BOX(hbox),
                                    theme_button4, TRUE, TRUE, 0);
     gtk_widget_show (theme_button4);
+
 }
 /*******************************************************************************/
-void 
+void
 lw_main_settings(Animation_WallpaperPrivate *priv, gpointer data){
     gint result;
     GtkWidget *window = NULL;
     GtkWidget *banner = NULL;
     GtkWidget *area_hbox;
-    GtkWidget *one_in_all_view_button; 
+    GtkWidget *one_in_all_view_button;
     gboolean one_in_all_view;
 
     window = gtk_dialog_new();
@@ -592,7 +592,7 @@ void
 rich_animation_additional_parametr(GtkWidget *vbox, Animation_WallpaperPrivate *priv){
     GtkWidget *rich_animation_button;
 
-    /* Create rich animation button */  
+    /* Create rich animation button */
     rich_animation_button = create_bool_button(priv->rich_animation, _("Rich Animation"));
     gtk_box_pack_start(GTK_BOX(vbox),
                                    rich_animation_button, TRUE, TRUE, 5);
@@ -618,13 +618,13 @@ additional_parametr_for_theme_video(GtkWidget *vbox, Animation_WallpaperPrivate
 
     gtk_box_pack_start(GTK_BOX(vbox),
                                    file_button, TRUE, TRUE, 5);
-    g_object_set_data(G_OBJECT(priv->window), "filename_button", file_button);    
-    /* Create rich animation button */  
+    g_object_set_data(G_OBJECT(priv->window), "filename_button", file_button);
+    /* Create rich animation button */
     rich_animation_button = create_bool_button(priv->rich_animation, _("Loop"));
     gtk_box_pack_start(GTK_BOX(vbox),
                                    rich_animation_button, TRUE, TRUE, 5);
     g_object_set_data(G_OBJECT(priv->window), "rich_animation_button", rich_animation_button);
-    /* Create Smoothing button */  
+    /* Create Smoothing button */
 
     smoothing_button = create_bool_button(priv->theme_bool_parametr1, _("Smoothing (Need more memory)"));
     gtk_box_pack_start(GTK_BOX(vbox),
@@ -653,7 +653,7 @@ show_duplicate_theme (GtkWidget *widget, gchar *theme_name){
 }
 
 /*******************************************************************************/
-void 
+void
 lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     gint result;
     GtkWidget *window = NULL;
@@ -664,7 +664,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     GtkWidget *enable_button;
     GtkWidget *vbox;
     GtkWidget *area_vbox;
-    GtkWidget *temp_button; 
+    GtkWidget *temp_button;
     GtkWidget *button1 = NULL;
     GtkWidget *rich_animation_button = NULL;
     gint view = priv->view;
@@ -688,7 +688,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     gtk_widget_set_size_request(scrolled_window, -1, 370);
 
     /* Create Enable button */
-    enable_button = create_enable_button(check_applet_state(view)); 
+    enable_button = create_enable_button(check_applet_state(view));
     gtk_box_pack_start(GTK_BOX(area_vbox),
                                    enable_button, FALSE, FALSE, 5);
     /* Create Category button */
@@ -730,11 +730,12 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
             /* Check theme */
             if (hildon_button_get_value(HILDON_BUTTON (theme_button)) &&
                 strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), "")){
+#if 0
                 /* Check Xsnow program */
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Xsnow"))){
                     if (access("/usr/bin/xsnow", F_OK) != 0){
                         show_problem_package(button, "Xsnow");
-                        /* if not scuccess exit from wthout saving */ 
+                        /* if not scuccess exit from wthout saving */
                         break;
                     }
                 }
@@ -742,7 +743,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), "Shermans Aquarium")){
                     if (access("/usr/bin/shermans", F_OK) != 0){
                         show_problem_package(button,"'Sherman's Aquarium'");
-                        /* if not scuccess exit from wthout saving */ 
+                        /* if not scuccess exit from wthout saving */
                         break;
                     }
                 }
@@ -750,7 +751,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), "Conky")){
                     if (access("/usr/bin/conky", F_OK) != 0){
                         show_problem_package(button,"'Conky'");
-                        /* if not scuccess exit from wthout saving */ 
+                        /* if not scuccess exit from wthout saving */
                         break;
                     }
                 }
@@ -758,7 +759,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), "Orrery")){
                     if (access("/opt/maemo/usr/bin/orrery", F_OK) != 0){
                         show_problem_package(button,"'Orrery'");
-                        /* if not scuccess exit from wthout saving */ 
+                        /* if not scuccess exit from wthout saving */
                         break;
                     }
                 }
@@ -766,7 +767,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), "CrazyChickens")){
                     if (access("/usr/bin/crazychickens", F_OK) != 0){
                         show_problem_package(button,"'Crazy Chickens'");
-                        /* if not scuccess exit from wthout saving */ 
+                        /* if not scuccess exit from wthout saving */
                         break;
                     }
                 }
@@ -775,11 +776,11 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), "Colorflood")){
                     if (access("/usr/bin/colorflood", F_OK) != 0){
                         show_problem_package(button,"'Colorflood'");
-                        /* if not scuccess exit from wthout saving */ 
+                        /* if not scuccess exit from wthout saving */
                         break;
                     }
                 }
-
+#endif
                 if (priv->theme)
                     g_free(priv->theme);
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Berlin")))
@@ -810,14 +811,34 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                 GSList *store = priv->extheme_list;
                 while (store){
                     if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _(g_hash_table_lookup(store->data, "name")))){
-                        gchar *copies = g_hash_table_lookup(store->data, "copies");
+                        //check if theme installed
+                       gchar *check_path = g_hash_table_lookup(store->data, "check_path");
+                       if (check_path){
+                               if (access(check_path, F_OK) != 0){
+                                       show_problem_package(button, g_hash_table_lookup(store->data, "name"));
+                                       gchar * install_file = g_hash_table_lookup(store->data, "install_file");
+                                       if (install_file){
+                                               gchar * cmd = g_strdup_printf("dbus-send --print-reply --dest=com.nokia.osso_browser /com/nokia/osso_browser/service com.nokia.osso_browser.open_new_window string:file://%s",
+                                                                                                                                       install_file);
+                                               fprintf(stderr, "system %s\n", cmd);
+                                               system(cmd);
+                                               g_free(cmd);
+                                       }
+                                       /* if not success exit from without saving */
+                                       break;
+                               }
+                       }
+
+
+                       //check if theme already selected
+                       gchar *copies = g_hash_table_lookup(store->data, "copies");
                         //fprintf(stderr, "copies = %s\n", copies);
                         if (copies){
                             count = atoi(copies);
                         }else count = 10;
                         if (count > get_count_themes_from_config(g_hash_table_lookup(store->data, "name")))
                             priv->theme = g_strdup(g_hash_table_lookup(store->data, "name"));
-                        else 
+                        else
                             show_duplicate_theme(button, g_hash_table_lookup(store->data, "name"));
                         //priv->hash_theme = store->data;
                         break;
@@ -878,7 +899,7 @@ check_applet_state(gint number){
 
     str = g_strdup_printf("livewp-home-widget.desktop-%i", (number - 1));
     config_file = hd_config_file_new(NULL, "/home/user/.config/hildon-desktop/", "home.plugins");
-    
+
     gkey_file = hd_config_file_load_file(config_file, FALSE);
     if (gkey_file && str){
         result = g_key_file_has_group(gkey_file, str);
@@ -898,7 +919,7 @@ start_applet(gint number){
         return;
     str = g_strdup_printf("livewp-home-widget.desktop-%i",(number - 1));
     config_file = hd_config_file_new(NULL, "/home/user/.config/hildon-desktop/", "home.plugins");
-    
+
     gkey_file = hd_config_file_load_file(config_file, FALSE);
     if (gkey_file){
         g_key_file_set_string (gkey_file, str, "X-Desktop-File", "/usr/share/applications/hildon-home/livewp-home-widget.desktop");
@@ -921,10 +942,10 @@ stop_applet(gint number){
         return;
     str = g_strdup_printf("livewp-home-widget.desktop-%i", (number - 1));
     config_file = hd_config_file_new(NULL, "/home/user/.config/hildon-desktop/", "home.plugins");
-    
+
     gkey_file = hd_config_file_load_file(config_file, FALSE);
     if (gkey_file){
-         g_key_file_remove_group(gkey_file, str, NULL);  
+         g_key_file_remove_group(gkey_file, str, NULL);
         hd_config_file_save_file( config_file, gkey_file);
         g_key_file_free(gkey_file);
     }else