tryed fix xsnow
authortanya <tanyshk@gmail.com>
Thu, 5 Aug 2010 07:30:39 +0000 (10:30 +0300)
committertanya <tanyshk@gmail.com>
Thu, 5 Aug 2010 07:30:39 +0000 (10:30 +0300)
applet/src/livewp-settings.c

index 6d4911c..ef23997 100644 (file)
@@ -371,6 +371,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     GtkWidget *button1 = NULL;
     GtkWidget *rich_animation_button = NULL;
     gint view = priv->view;
+    gboolean success_choice = TRUE;
 
     window = gtk_dialog_new();
     priv->window = window;
@@ -429,9 +430,15 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                     priv->theme = g_strdup("Matrix");
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Accel")))
                     priv->theme = g_strdup("Accel");
-                if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Xsnow")))
+                if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Xsnow"))){
                     priv->theme = g_strdup("Xsnow");
+                    if (access("/usr/bin/xsnow", F_OK) != 0){
+                        fprintf(stderr,"sddddddddddddddddddddddddddddd\n");
+                        success_choice = FALSE;
+                        hildon_banner_show_information(GTK_WIDGET(window), NULL, 
+                        _("You haven't got the installed package Xsnow. Please install it via using Application Manager"));
+                    }
+                }
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Video"))){
                     priv->theme = g_strdup("Video");
                     button1 = g_object_get_data(G_OBJECT(priv->window), "filename_button");
@@ -452,6 +459,9 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                 else
                     priv->rich_animation = FALSE;
             }
+            /* if not scuccess exit from wthout saving */ 
+            if (!success_choice)
+                break;
             /* Save config */
             save_config(priv);
             /* action with applet */