aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog14
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c12
3 files changed, 26 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index ca2f66b6d7..74fb95b57a 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,17 @@
+2004-05-10 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
+
+ Fixes bug #44196 addressbook table view uses ASCII sort
+
+ * addressbook/gui/widgets/e-addressbook-view.c (compare_subitems):
+ Uses g_utf8_collate for right UTF8 sort. Made faster using
+ g_utf8_collate_key.
+
+ Also fixes a bug in
+
+ * gui/component/select-names/e-select-names.c (select_entry_changed):
+ Changed g_utf8_collate for strcmp as we are already comparing keys
+ made from g_utf8_collate_key.
+
2004-05-08 Enver ALTIN <enver.altin@frontsite.com.tr>
* gui/component/GNOME_Evolution_Addressbook.server.in.in:
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c
index 94ccef34c8..25c79790f9 100644
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ b/addressbook/gui/component/select-names/e-select-names.c
@@ -425,7 +425,7 @@ select_entry_changed (GtkWidget *widget, ESelectNames *e_select_names)
E_CONTACT_FULL_NAME,
model_row),
-1);
- if (g_utf8_collate (select_strcoll_string, row_strcoll_string) <= 0) {
+ if (strcmp (select_strcoll_string, row_strcoll_string) <= 0) {
g_free (row_strcoll_string);
break;
}
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index cf51653cd9..0c36039701 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -1638,8 +1638,18 @@ compare_subitems (const void *a, const void *b)
{
const ESearchBarSubitem *subitem_a = a;
const ESearchBarSubitem *subitem_b = b;
+ char *collate_a, *collate_b;
+ int ret;
- return strcoll (subitem_a->text, subitem_b->text);
+ collate_a = g_utf8_collate_key (subitem_a->text, -1);
+ collate_b = g_utf8_collate_key (subitem_b->text, -1);
+
+ ret = strcmp (collate_a, collate_b);
+
+ g_free (collate_a);
+ g_free (collate_b);
+
+ return ret;
}
static void