g_free(text);
}
/*******************************************************************************/
+void
+show_duplicate_theme (GtkWidget *widget, gchar *theme_name){
+ gchar *text;
+ text = g_strdup_printf(_("Theme %s has already been selected"), theme_name);
+ hildon_banner_show_information(GTK_WIDGET(widget), NULL, text);
+ g_free(text);
+}
+
+/*******************************************************************************/
void
lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
gint result;
GtkWidget *button1 = NULL;
GtkWidget *rich_animation_button = NULL;
gint view = priv->view;
+ gint count;
window = gtk_dialog_new();
priv->window = window;
GSList *store = priv->extheme_list;
while (store){
if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _(g_hash_table_lookup(store->data, "name")))){
- priv->theme = g_strdup(g_hash_table_lookup(store->data, "name"));
+ gchar *copies = g_hash_table_lookup(store->data, "copies");
+ //fprintf(stderr, "copies = %s\n", copies);
+ if (copies){
+ count = atoi(copies);
+ }else count = 10;
+ if (count > get_count_themes_from_config(g_hash_table_lookup(store->data, "name")))
+ priv->theme = g_strdup(g_hash_table_lookup(store->data, "name"));
+ else
+ show_duplicate_theme(button, g_hash_table_lookup(store->data, "name"));
//priv->hash_theme = store->data;
break;
}