[Commits] [SCM] claws branch, gtk3tree, updated. 3.99.0-97-ga79126109

thorsten at claws-mail.org thorsten at claws-mail.org
Sat Apr 3 23:48:03 CEST 2021


The branch, gtk3tree has been updated
       via  a7912610911f4e48b640225cde574826ffcc5bec (commit)
      from  f41654c59b989b23195868585e4307a2e3105ed6 (commit)

Summary of changes:
 src/folderview.c | 11 +++++++++++
 1 file changed, 11 insertions(+)


- Log -----------------------------------------------------------------
commit a7912610911f4e48b640225cde574826ffcc5bec
Author: Thorsten Maerz <info at netztorte.de>
Date:   Sat Apr 3 21:02:33 2021 +0200

    Ignore case when sorting foldertree on Win32

diff --git a/src/folderview.c b/src/folderview.c
index c4d5d81c6..bdd7b85dc 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -224,6 +224,9 @@ static gint folderview_compare_func(GtkTreeModel *model, GtkTreeIter *a,
 				    GtkTreeIter *b, gpointer context)
 {
 	gchar *str_a = NULL, *str_b = NULL;
+#ifdef G_OS_WIN32
+	gchar *str_a_dn = NULL, *str_b_dn = NULL;
+#endif /* G_OS_WIN32 */
 	gint val = 0;
 	FolderItem *item_a = NULL, *item_b = NULL;
 	GtkTreeIter parent;
@@ -257,6 +260,14 @@ static gint folderview_compare_func(GtkTreeModel *model, GtkTreeIter *a,
 	gtk_tree_model_get(model, b, F_COL_FOLDER, &str_b, -1);
 
 	/* otherwise just compare the folder names */
+#ifdef G_OS_WIN32
+	str_a_dn = g_utf8_casefold(str_a, -1);
+	str_b_dn = g_utf8_casefold(str_b, -1);
+	g_free(str_a);
+	g_free(str_b);
+	str_a = str_a_dn;
+	str_b = str_b_dn;
+#endif /* G_OS_WIN32 */
 	val = g_utf8_collate(str_a, str_b);
 
 	g_free(str_a);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list