Mercurial > geeqie.yaz
changeset 1394:bec57fa486f4
allow dropping of multiple keywords
author | nadvornik |
---|---|
date | Sun, 08 Mar 2009 10:38:51 +0000 |
parents | 79b32088ecc4 |
children | e86d8facbdae |
files | src/bar_keywords.c |
diffstat | 1 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/bar_keywords.c Sun Mar 08 10:25:24 2009 +0000 +++ b/src/bar_keywords.c Sun Mar 08 10:38:51 2009 +0000 @@ -533,7 +533,8 @@ GtkTreeModel *keyword_tree; gboolean src_valid = FALSE; - gchar *new_keyword = NULL; + GList *new_keywords = NULL; + GList *work; /* iterators for keyword_tree */ GtkTreeIter src_kw_iter; @@ -560,7 +561,7 @@ break; } default: - new_keyword = (gchar *)selection_data->data; + new_keywords = string_to_keywords_list((gchar *)selection_data->data); break; } @@ -603,10 +604,19 @@ keyword_move_recursive(GTK_TREE_STORE(keyword_tree), &new_kw_iter, &src_kw_iter); } - if (new_keyword) + work = new_keywords; + while (work) { - keyword_set(GTK_TREE_STORE(keyword_tree), &new_kw_iter, new_keyword, TRUE); + keyword_set(GTK_TREE_STORE(keyword_tree), &new_kw_iter, work->data, TRUE); + work = work->next; + if (work) + { + GtkTreeIter add; + gtk_tree_store_insert_after(GTK_TREE_STORE(keyword_tree), &add, NULL, &new_kw_iter); + new_kw_iter = add; + } } + string_list_free(new_keywords); } static gint bar_pane_keywords_dnd_motion(GtkWidget *tree_view, GdkDragContext *context,