[gthumb] tags: use g_utf8_collate to compare tags



commit c86e37cc836cf641a90d9f64d0990458239eaf48
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Thu Nov 2 09:59:30 2017 +0100

    tags: use g_utf8_collate to compare tags

 gthumb/gth-tags-file.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-tags-file.c b/gthumb/gth-tags-file.c
index 59a0162..c9a8af9 100644
--- a/gthumb/gth-tags-file.c
+++ b/gthumb/gth-tags-file.c
@@ -266,7 +266,7 @@ gboolean
 gth_tags_file_has_tag (GthTagsFile *tags,
                       const char  *tag)
 {
-       return g_list_find_custom (tags->items, tag, (GCompareFunc) strcmp) != NULL;
+       return g_list_find_custom (tags->items, tag, (GCompareFunc) g_utf8_collate) != NULL;
 }
 
 
@@ -276,7 +276,7 @@ gth_tags_file_add (GthTagsFile *tags,
 {
        GList *link;
 
-       link = g_list_find_custom (tags->items, tag, (GCompareFunc) strcmp);
+       link = g_list_find_custom (tags->items, tag, (GCompareFunc) g_utf8_collate);
        if (link == NULL) {
                tags->items = g_list_append (tags->items, g_strdup (tag));
                return TRUE;
@@ -292,7 +292,7 @@ gth_tags_file_remove (GthTagsFile *tags,
 {
        GList *link;
 
-       link = g_list_find_custom (tags->items, tag, (GCompareFunc) strcmp);
+       link = g_list_find_custom (tags->items, tag, (GCompareFunc) g_utf8_collate);
        if (link == NULL)
                return FALSE;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]