[recipes] Make filtering translated unit names work
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Make filtering translated unit names work
- Date: Sat, 31 Dec 2016 02:06:47 +0000 (UTC)
commit af21c137230be967a010148996aea62aedbd30e6
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 30 16:01:01 2016 -0500
Make filtering translated unit names work
This wasn't working because we forgot to case-fold them.
src/gr-edit-page.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gr-edit-page.c b/src/gr-edit-page.c
index 183369e..ed7ae33 100644
--- a/src/gr-edit-page.c
+++ b/src/gr-edit-page.c
@@ -730,14 +730,15 @@ unit_filter_func (GtkListBoxRow *row,
{
GrEditPage *self = data;
const char *unit;
- const char *cf1, *cf2;
+ g_autofree char *cf1 = NULL;
+ g_autofree char *cf2 = NULL;
if (!self->unit_term)
return TRUE;
unit = (const char *)g_object_get_data (G_OBJECT (row), "unit");
- cf1 = gr_unit_get_abbreviation (unit);
- cf2 = gr_unit_get_display_name (unit);
+ cf1 = g_utf8_casefold (gr_unit_get_abbreviation (unit), -1);
+ cf2 = g_utf8_casefold (gr_unit_get_display_name (unit), -1);
return g_str_has_prefix (cf1, self->unit_term) ||
g_str_has_prefix (cf2, self->unit_term);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]