Mercurial > geeqie
changeset 1193:aed0e28b2744
keyword_list_find() -> find_string_in_list(), return gboolean.
author | zas_ |
---|---|
date | Sun, 30 Nov 2008 21:59:28 +0000 |
parents | 48d62a7e3c33 |
children | ef7530186597 |
files | src/bar_info.c src/metadata.c src/metadata.h |
diffstat | 3 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/bar_info.c Sun Nov 30 21:52:37 2008 +0000 +++ b/src/bar_info.c Sun Nov 30 21:59:28 2008 +0000 @@ -471,7 +471,7 @@ gchar *key = list->data; gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, KEYWORD_COLUMN_TOGGLE, keyword_list_find(keywords, key), + gtk_list_store_set(store, &iter, KEYWORD_COLUMN_TOGGLE, find_string_in_list(keywords, key), KEYWORD_COLUMN_TEXT, key, -1); list = list->prev; @@ -589,7 +589,7 @@ if (!keyword) return; list = keyword_list_pull(bd->keyword_view); - found = keyword_list_find(list, keyword); + found = find_string_in_list(list, keyword); if (active != found) {
--- a/src/metadata.c Sun Nov 30 21:52:37 2008 +0000 +++ b/src/metadata.c Sun Nov 30 21:59:28 2008 +0000 @@ -519,13 +519,13 @@ g_free(comment); } -gint keyword_list_find(GList *list, const gchar *keyword) +gboolean find_string_in_list(GList *list, const gchar *string) { while (list) { gchar *haystack = list->data; - if (haystack && keyword && strcmp(haystack, keyword) == 0) return TRUE; + if (haystack && string && strcmp(haystack, string) == 0) return TRUE; list = list->next; } @@ -562,7 +562,7 @@ gchar *keyword = g_strndup(begin, l); /* only add if not already in the list */ - if (keyword_list_find(list, keyword) == FALSE) + if (find_string_in_list(list, keyword) == FALSE) list = g_list_append(list, keyword); else g_free(keyword);
--- a/src/metadata.h Sun Nov 30 21:52:37 2008 +0000 +++ b/src/metadata.h Sun Nov 30 21:59:28 2008 +0000 @@ -19,7 +19,7 @@ gint metadata_read(FileData *fd, GList **keywords, gchar **comment); void metadata_set(FileData *fd, GList *keywords_to_use, gchar *comment_to_use, gboolean append); -gint keyword_list_find(GList *list, const gchar *keyword); +gboolean find_string_in_list(GList *list, const gchar *keyword); GList *string_to_keywords_list(const gchar *text); #endif