<theme>
<name>Flash</name>
<exec_path>/opt/kmplayer/bin/knpplayer -m application/x-shockwave-flash -p /usr/lib/browser/plugins/libflashplayer.so</exec_path>
- <category>Unknown</category>
+ <category>LiveWallpaper</category>
<icon_on>/usr/share/livewp/theme/Conky/icon.png</icon_on>
<icon_off>/usr/share/livewp/theme/Conky/icond.png</icon_off>
<gtk_socket_id>-wid</gtk_socket_id>
<check_path>/opt/kmplayer/bin/knpplayer</check_path>
<install_file>http://maemo.org/downloads/product/raw/Maemo5/kmplayer/?get_installfile</install_file>
- <file id="file" _label="File" arg="file://%"/>
- <added_string>file:///home/user/flash_matrix.swf</added_string>
</theme>
*strwin = NULL,
*strsocket = NULL,
*addedstring = NULL,
+ *theme_string_parametr1 = NULL,
*straddedstring = NULL,
*strview = NULL;
gint i;
}else
straddedstring = "";
- run_string = g_strdup_printf("%s%s%s%s%s", exec_path, strwin, strview, strsocket, straddedstring);
+ if (desktop_plugin->priv->theme_string_parametr1){
+ theme_string_parametr1 = g_strdup_printf(" %s", desktop_plugin->priv->theme_string_parametr1);
+ }else
+ theme_string_parametr1 = "";
+
+ run_string = g_strdup_printf("%s%s%s%s%s%s", exec_path, strwin, strview, strsocket, straddedstring, theme_string_parametr1);
fprintf(stderr, "runs string = %s\n", run_string);
parsestring(run_string, child_argv);
selector = hildon_touch_selector_new_text();
- hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), "LiveWallpaper" );
result_table = g_hash_table_new(g_str_hash, g_str_equal);
while (store){
g_hash_table_insert(result_table, "Xscreensaver", (gint *)1);
hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), "Xscreensaver");
}
+ /* Add LiveWallpaper to selector */
+ if (!g_hash_table_lookup(result_table,"LiveWallpaper")){
+ hildon_touch_selector_prepend_text (HILDON_TOUCH_SELECTOR (selector), "LiveWallpaper" );
+ }
+
return selector;
}
if (!strcmp(choice, _("Video"))){
additional_parametr_for_theme_video(vbox, priv);
}
+ if (!strcmp(choice, _("Flash"))){
+ additional_parametr_for_theme_flash(vbox, priv);
+ }
+
}
gtk_widget_show(vbox);
}
}
/*******************************************************************************/
void
+additional_parametr_for_theme_flash(GtkWidget *vbox, Animation_WallpaperPrivate *priv){
+
+ GtkWidget *file_button;
+ GtkWidget *link_button;
+ GtkWidget *smoothing_button;
+ GtkWidget *rich_animation_button;
+
+ if (priv->theme_string_parametr1)
+ file_button = hildon_button_new_with_text (HILDON_SIZE_FINGER_HEIGHT, HILDON_BUTTON_ARRANGEMENT_VERTICAL,
+ _("Play file"), priv->theme_string_parametr1);
+ else
+ file_button = hildon_button_new_with_text (HILDON_SIZE_FINGER_HEIGHT,HILDON_BUTTON_ARRANGEMENT_VERTICAL,
+ _("Play file")," ");
+
+ g_signal_connect (file_button, "clicked", G_CALLBACK (file_button_clicked), priv);
+
+ gtk_box_pack_start(GTK_BOX(vbox),
+ file_button, TRUE, TRUE, 5);
+ g_object_set_data(G_OBJECT(priv->window), "filename_button", file_button);
+ gtk_widget_show (file_button);
+}
+/*******************************************************************************/
+
+void
show_problem_package (GtkWidget *widget, gchar *package_name){
gchar *text;
text = g_strdup_printf(_("You haven't got the installed package %s. Please install it via using Application Manager"), package_name);
priv->theme_bool_parametr1 = FALSE;
}
}
+ if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Flash"))){
+ button1 = g_object_get_data(G_OBJECT(priv->window), "filename_button");
+ if (button1){
+ if (priv->theme_string_parametr1)
+ g_free(priv->theme_string_parametr1);
+ priv->theme_string_parametr1 = g_strdup((gchar*)hildon_button_get_value (HILDON_BUTTON(button1)));
+ }
+ }
/* Check external themes */
GSList *store = priv->extheme_list;
while (store){