gnucash maint: Bug 797994 - Account type-ahead search doesn't match accented...
John Ralls
jralls at code.gnucash.org
Sun Nov 1 19:37:28 EST 2020
Updated via https://github.com/Gnucash/gnucash/commit/5ced4174 (commit)
from https://github.com/Gnucash/gnucash/commit/ccc65318 (commit)
commit 5ced417467c41138f3c0e94d6dd2d7185b7553d6
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Nov 1 16:32:09 2020 -0800
Bug 797994 - Account type-ahead search doesn't match accented...
characters.
Because of normalizing the account name but not the search pattern.
diff --git a/gnucash/register/register-gnome/combocell-gnome.c b/gnucash/register/register-gnome/combocell-gnome.c
index 27add82e7..27fd7c799 100644
--- a/gnucash/register/register-gnome/combocell-gnome.c
+++ b/gnucash/register/register-gnome/combocell-gnome.c
@@ -536,7 +536,8 @@ gnc_combo_cell_type_ahead_search (const gchar* newval,
GRegex* regex0 = g_regex_new (escaped_sep, 0, 0, NULL);
char* rep_str = g_regex_replace_literal (regex0, escaped_newval, -1, 0,
newval_rep, 0, NULL);
- GRegex *regex = g_regex_new (rep_str, G_REGEX_CASELESS, 0, NULL);
+ char* normal_rep_str = g_utf8_normalize (rep_str, -1, G_NORMALIZE_ALL);
+ GRegex *regex = g_regex_new (normal_rep_str, G_REGEX_CASELESS, 0, NULL);
gboolean valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (full_store),
&iter);
@@ -546,6 +547,7 @@ gnc_combo_cell_type_ahead_search (const gchar* newval,
*/
static const gint MAX_NUM_MATCHES = 30;
+ g_free (normal_rep_str);
g_free (rep_str);
g_free (newval_rep);
g_free (escaped_sep);
Summary of changes:
gnucash/register/register-gnome/combocell-gnome.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list