fixed problem with changing of category
authorvlad <vlad@vlanout.(none)>
Sat, 14 Aug 2010 15:09:00 +0000 (18:09 +0300)
committervlad <vlad@vlanout.(none)>
Sat, 14 Aug 2010 15:09:00 +0000 (18:09 +0300)
applet/src/livewp-settings.c

index 04bd52c..cf69168 100644 (file)
@@ -117,7 +117,6 @@ set_button_image(GtkWidget * button, Animation_WallpaperPrivate *priv, gboolean
             str = g_strdup_printf( "%s/%s/%s", THEME_PATH, 
                             priv->theme, "icond.png");
     }
-    fprintf(stderr, "icon = %s\n", str);
     pixbuf = gdk_pixbuf_new_from_file_at_size (str, 
                                                  100, 
                                                  60, 
@@ -165,13 +164,10 @@ changed_value_theme_cb (HildonPickerButton *picker, Animation_WallpaperPrivate *
     const gchar *choice = hildon_button_get_value(HILDON_BUTTON (picker));
     GtkWidget *vbox = NULL;
         
-    fprintf(stderr,"dddddddddddddddddddddd %s\n", choice);
     vbox = g_object_get_data(G_OBJECT(priv->window), "custom_vbox");
     if (vbox){
-        fprintf(stderr,"ssssssssssssssssssssssssss\n");
         gtk_widget_destroy(vbox);
     }
-    fprintf(stderr,"dddddddddddddddddddddd .%s.\n", choice);
     vbox = gtk_vbox_new (FALSE, 5);
     g_object_set_data(G_OBJECT(priv->window), "custom_vbox", vbox);
     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(priv->window)->vbox),
@@ -217,6 +213,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);
     if (!category){
         changed_value_theme_cb(HILDON_PICKER_BUTTON (button), priv);
         return;
@@ -283,7 +280,6 @@ create_themes_button (Animation_WallpaperPrivate *priv, gchar *category){
     GtkWidget *button;
     button = hildon_picker_button_new (HILDON_SIZE_AUTO, HILDON_BUTTON_ARRANGEMENT_VERTICAL);
     hildon_button_set_title (HILDON_BUTTON (button), _("Theme"));
-    fill_theme_button(priv, button, category);
 
    
     return button;
@@ -470,6 +466,7 @@ file_button_clicked(GtkButton *button, Animation_WallpaperPrivate *priv){
 void
 rich_animation_additional_parametr(GtkWidget *vbox, Animation_WallpaperPrivate *priv){
     GtkWidget *rich_animation_button;
+
     /* Create rich animation button */  
     rich_animation_button = create_rich_animation_button(priv->rich_animation, _("Rich Animation"));
     gtk_box_pack_start(GTK_BOX(vbox),
@@ -535,6 +532,9 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     g_signal_connect (G_OBJECT (category_button), "value-changed",  G_CALLBACK (changed_value_category_cb), priv);
     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox),
                                    category_button, TRUE, TRUE, 5);
+    /* Create custom vbox */
+    vbox = gtk_vbox_new (FALSE, 5);
+    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)));
@@ -542,10 +542,8 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     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)));
 
-    /* Create custom vbox */
-    vbox = gtk_vbox_new (FALSE, 5);
-    g_object_set_data(G_OBJECT(window), "custom_vbox", vbox);
     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox),
                                    vbox, TRUE, TRUE, 5);
 #if 0