From: tanya Date: Fri, 1 Oct 2010 14:08:02 +0000 (+0300) Subject: started check time to change images X-Git-Url: http://vcs.maemo.org/git/?p=livewp;a=commitdiff_plain;h=2d639863166e78defe2490bc0f0d94795ed4f03f started check time to change images --- diff --git a/applet/data/external_themes/flash.xml b/applet/data/external_themes/flash.xml index d237165..3b9708f 100644 --- a/applet/data/external_themes/flash.xml +++ b/applet/data/external_themes/flash.xml @@ -2,8 +2,8 @@ Flash /opt/kmplayer/bin/knpplayer -m application/x-shockwave-flash -p /usr/lib/browser/plugins/libflashplayer.so LiveWallpaper - /usr/share/livewp/theme/Conky/icon.png - /usr/share/livewp/theme/Conky/icond.png + /usr/share/livewp/theme/Flash/icon.png + /usr/share/livewp/theme/Flash/icond.png -wid /opt/kmplayer/bin/knpplayer http://maemo.org/downloads/product/raw/Maemo5/kmplayer/?get_installfile diff --git a/applet/data/theme/Flash/icon.png b/applet/data/theme/Flash/icon.png new file mode 100644 index 0000000..5629d47 Binary files /dev/null and b/applet/data/theme/Flash/icon.png differ diff --git a/applet/data/theme/Flash/icond.png b/applet/data/theme/Flash/icond.png new file mode 100644 index 0000000..0060f8f Binary files /dev/null and b/applet/data/theme/Flash/icond.png differ diff --git a/applet/data/theme/Slideshow/icon.png b/applet/data/theme/Slideshow/icon.png new file mode 100644 index 0000000..12b44dc Binary files /dev/null and b/applet/data/theme/Slideshow/icon.png differ diff --git a/applet/data/theme/Slideshow/icond.png b/applet/data/theme/Slideshow/icond.png new file mode 100644 index 0000000..b223678 Binary files /dev/null and b/applet/data/theme/Slideshow/icond.png differ diff --git a/applet/src/livewp-scene.c b/applet/src/livewp-scene.c index 840003a..7d51500 100644 --- a/applet/src/livewp-scene.c +++ b/applet/src/livewp-scene.c @@ -395,7 +395,7 @@ init_scene_Slideshow(AWallpaperPlugin *desktop_plugin) GSList *store = NULL; gint num = 0; - fprintf(stderr, "init scene Slideshow \n"); + fprintf(stderr, "init scene Slideshow %d\n", desktop_plugin->priv->theme_int_parametr1); scene = g_new0(Scene, 1); scene->actors = NULL; diff --git a/applet/src/livewp-settings.c b/applet/src/livewp-settings.c index 6bc84fd..0850aa7 100644 --- a/applet/src/livewp-settings.c +++ b/applet/src/livewp-settings.c @@ -439,7 +439,34 @@ create_categories_button (Animation_WallpaperPrivate *priv){ } return button; } - +/*******************************************************************************/ +GtkWidget * +create_time_button (guint *active, gchar *name) +{ + GtkWidget *button; + GtkWidget *selector; + guint values[5] = {20, 40, 60, 120, 300}; + int i, num = 0; + gchar *str; + + button = hildon_picker_button_new (HILDON_SIZE_FINGER_HEIGHT, HILDON_BUTTON_ARRANGEMENT_VERTICAL); + hildon_button_set_title (HILDON_BUTTON (button), name); + + selector = hildon_touch_selector_new_text(); + for (i=0; i<5; i++){ + str = g_strdup_printf("%d", values[i]); + hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), str); + if (values[i] == active) num = i; + } + hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (button), + HILDON_TOUCH_SELECTOR (selector)); + hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, num); + if (active) + hildon_button_set_value(HILDON_BUTTON(button), active); + else + hildon_button_set_value(HILDON_BUTTON(button), ""); + return button; +} /*******************************************************************************/ GtkWidget * create_bool_button (gboolean active, gchar *name) @@ -730,9 +757,7 @@ void additional_parametr_for_theme_slideshow(GtkWidget *vbox, Animation_WallpaperPrivate *priv){ GtkWidget *file_button; - GtkWidget *link_button; - GtkWidget *smoothing_button; - GtkWidget *rich_animation_button; + GtkWidget *time_button; if (priv->theme_string_parametr1) file_button = hildon_button_new_with_text (HILDON_SIZE_FINGER_HEIGHT, HILDON_BUTTON_ARRANGEMENT_VERTICAL, @@ -743,9 +768,17 @@ additional_parametr_for_theme_slideshow(GtkWidget *vbox, Animation_WallpaperPriv g_signal_connect (file_button, "clicked", G_CALLBACK (folder_button_clicked), priv); - gtk_box_pack_start(GTK_BOX(vbox), - file_button, TRUE, TRUE, 5); + gtk_box_pack_start(GTK_BOX(vbox), file_button, TRUE, TRUE, 5); g_object_set_data(G_OBJECT(priv->window), "filename_button", file_button); + + if (priv->theme_int_parametr1) + time_button = create_time_button(priv->theme_int_parametr1, _("Time to change image")); + else + time_button = create_time_button(0, _("Time to change image")); + gtk_box_pack_start(GTK_BOX(vbox), time_button, TRUE, TRUE, 5); + g_object_set_data(G_OBJECT(priv->window), "time_button", time_button); + + gtk_widget_show (time_button); gtk_widget_show (file_button); } /*******************************************************************************/ @@ -779,7 +812,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) { GtkWidget *vbox; GtkWidget *area_vbox; GtkWidget *temp_button; - GtkWidget *button1 = NULL; + GtkWidget *button1 = NULL, *button2 = NULL; GtkWidget *rich_animation_button = NULL; GtkWidget *confirm; gint view = priv->view; @@ -892,6 +925,12 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) { g_free(priv->theme_string_parametr1); priv->theme_string_parametr1 = g_strdup((gchar*)hildon_button_get_value (HILDON_BUTTON(button1))); } + button2 = g_object_get_data(G_OBJECT(priv->window), "time_button"); + if (button2){ + if (priv->theme_int_parametr1) + g_free(priv->theme_int_parametr1); + priv->theme_int_parametr1 = (guint)hildon_button_get_value (HILDON_BUTTON(button2)); + } } /* Check external themes */ GSList *store = priv->extheme_list;