rich animation button almost done
authorVlad Vasiliev <vlad@toshiba2.oblgaz>
Mon, 12 Apr 2010 13:23:34 +0000 (16:23 +0300)
committerVlad Vasiliev <vlad@toshiba2.oblgaz>
Mon, 12 Apr 2010 13:23:34 +0000 (16:23 +0300)
applet/src/livewp-settings.c

index 00b3691..6b1ec12 100644 (file)
@@ -83,6 +83,18 @@ create_themes_button (gchar *theme){
     }
     return button;
 }
+
+/*******************************************************************************/
+GtkWidget *
+create_rich_animation_button (void)
+{
+    GtkWidget *button;
+    button = hildon_check_button_new (HILDON_SIZE_AUTO);
+    gtk_button_set_label (GTK_BUTTON (button), _("Rich Animation"));
+//  g_signal_connect (button, "toggled", G_CALLBACK (button_toggled), NULL);
+    return button;
+}
+
 /*******************************************************************************/
 void 
 lw_settings(GtkWidget *widget, Animation_WallpaperPrivate *priv){
@@ -90,6 +102,7 @@ lw_settings(GtkWidget *widget, Animation_WallpaperPrivate *priv){
     GtkWidget *window = NULL;
     GtkWidget *save_button;
     GtkWidget *theme_button;
+    GtkWidget *rich_animation_button;
 
     window = gtk_dialog_new();
     gtk_window_set_title(GTK_WINDOW(window), _("Live Wallpaper Settings"));
@@ -98,8 +111,11 @@ lw_settings(GtkWidget *widget, Animation_WallpaperPrivate *priv){
     /* Create Theme button */
     theme_button = create_themes_button(priv->theme);
     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox),
-                                   theme_button, TRUE, TRUE, 0);
-    /* Create risch animation button */
+                                   theme_button, TRUE, TRUE, 5);
+    /* Create rich animation button */  
+    rich_animation_button = create_rich_animation_button();
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox),
+                                   rich_animation_button, TRUE, TRUE, 5);
     gtk_widget_show (theme_button);
     gtk_widget_show (window);
     gtk_dialog_add_button(GTK_DIALOG(window), _("About"), GTK_RESPONSE_NO);
@@ -115,6 +131,10 @@ lw_settings(GtkWidget *widget, Animation_WallpaperPrivate *priv){
                     priv->theme = g_strdup("Berlin");
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Modern")))
                     priv->theme = g_strdup("Modern");
+                if (hildon_check_button_get_active (rich_animation_button))
+                    priv->rich_animation = TRUE;
+                else
+                    priv->rich_animation = FALSE;
             }
             save_config(priv);
             reload_scene(priv->desktop_plugin);