From: Vlad Vasiliev Date: Mon, 12 Apr 2010 13:23:34 +0000 (+0300) Subject: rich animation button almost done X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=4e8fb5053ea0d56ec2177ff1f83edd854c8e906c;p=livewp rich animation button almost done --- diff --git a/applet/src/livewp-settings.c b/applet/src/livewp-settings.c index 00b3691..6b1ec12 100644 --- a/applet/src/livewp-settings.c +++ b/applet/src/livewp-settings.c @@ -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);