tryed fix xsnow
[livewp] / applet / src / livewp-settings.c
index 08e70a3..ef23997 100644 (file)
@@ -34,9 +34,9 @@ void lw_about(void){
     gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
     gtk_window_set_modal(GTK_WINDOW(window), TRUE);
     vbox = gtk_vbox_new (FALSE, 5);
-    label_about = gtk_label_new (_("Live Wallpaper Version 0.7 \n Copyright(c) 2010\n \
+    label_about = gtk_label_new (_("Live Wallpaper Version 0.7.1 \n Copyright(c) 2010\n \
 Tanya Makova\n Vlad Vasiliev\n \
-Copyright(c) 2010 for design themes Berlin and Modern Vasya Bobrikov\n \
+Copyright(c) 2010 for design themes Berlin, Modern and Accel Vasya Bobrikov\n \
 Copyright(c) 2010 for design theme Matrix Andrew Zhilin\n \
 Translators:\n \
 Finnish - Marko Vertainen\n \
@@ -133,23 +133,23 @@ changed_value_theme_cb (HildonPickerButton *picker, Animation_WallpaperPrivate *
     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(priv->window)->vbox),
                                    vbox, TRUE, TRUE, 5);
     if (choice) {
-        if (!strcmp(choice, "Berlin")){
+        if (!strcmp(choice, _("Berlin"))){
             rich_animation_additional_parametr(vbox,priv);
         }
-        if (!strcmp(choice, "Modern")){
+        if (!strcmp(choice, _("Modern"))){
             rich_animation_additional_parametr(vbox,priv);
         }
-        if (!strcmp(choice, "Matrix")){
+        if (!strcmp(choice, _("Matrix"))){
             rich_animation_additional_parametr(vbox,priv);
         }
-        if (!strcmp(choice, "Xsnow")){
+        if (!strcmp(choice, _("Xsnow"))){
             rich_animation_additional_parametr(vbox,priv);
         }
 
-        if (!strcmp(choice, "Accel")){
+        if (!strcmp(choice, _("Accel"))){
             rich_animation_additional_parametr(vbox,priv);
         }
-        if (!strcmp(choice, "Video")){
+        if (!strcmp(choice, _("Video"))){
             additional_parametr_for_theme_video(vbox, priv);
         }
     }
@@ -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 */