gnucash maint: [import-main-matcher] don't need collated string anymore

Christopher Lam clam at code.gnucash.org
Sun Jul 24 00:56:14 EDT 2022


Updated	 via  https://github.com/Gnucash/gnucash/commit/544f9100 (commit)
	from  https://github.com/Gnucash/gnucash/commit/0ea46fab (commit)



commit 544f9100671a1d00f440def9671a823872fb8881
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sun Jul 24 12:49:20 2022 +0800

    [import-main-matcher] don't need collated string anymore

diff --git a/gnucash/import-export/import-main-matcher.c b/gnucash/import-export/import-main-matcher.c
index 24a86e356..69d77d8a8 100644
--- a/gnucash/import-export/import-main-matcher.c
+++ b/gnucash/import-export/import-main-matcher.c
@@ -978,7 +978,6 @@ static RowInfo * row_get_info (gpointer row, GNCImportMainMatcher *info)
 enum
 {
     COMPLETION_LIST_ORIGINAL,
-    COMPLETION_LIST_COLLATED,
     COMPLETION_LIST_NORMALIZED_FOLDED,
     NUM_COMPLETION_COLS
 };
@@ -987,18 +986,15 @@ static void populate_list (gpointer key, gpointer value, GtkListStore *list)
 {
     GtkTreeIter iter;
     const char *original = key;
-    char *collated = g_utf8_collate_key (original, -1);
-    char *normalized = collated ? g_utf8_normalize (original, -1, G_NORMALIZE_ALL) : NULL;
+    char *normalized = g_utf8_normalize (original, -1, G_NORMALIZE_ALL);
     char *normalized_folded = normalized ? g_utf8_casefold (normalized, -1) : NULL;
     gtk_list_store_append (list, &iter);
     gtk_list_store_set (list, &iter,
                         COMPLETION_LIST_ORIGINAL, original,
-                        COMPLETION_LIST_COLLATED, collated,
                         COMPLETION_LIST_NORMALIZED_FOLDED, normalized_folded,
                         -1);
     g_free (normalized_folded);
     g_free (normalized);
-    g_free (collated);
 }
 
 static gboolean



Summary of changes:
 gnucash/import-export/import-main-matcher.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)



More information about the gnucash-changes mailing list