aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorSuresh Chandrasekharan <suresh.chandrasekharan@sun.com>2004-05-11 08:42:19 +0800
committerSuresh Chandrasekharan <kcsuresh@src.gnome.org>2004-05-11 08:42:19 +0800
commit47ff96778e8d84e6906f3ae5e2f5a61147461ea6 (patch)
tree6ae00bc94d6fec4d74f603e5f2c9027b4e391bc2 /addressbook
parente1b9b7b34dcd729658fa5b6458feeb5a5f1a5bac (diff)
downloadgsoc2013-evolution-47ff96778e8d84e6906f3ae5e2f5a61147461ea6.tar
gsoc2013-evolution-47ff96778e8d84e6906f3ae5e2f5a61147461ea6.tar.gz
gsoc2013-evolution-47ff96778e8d84e6906f3ae5e2f5a61147461ea6.tar.bz2
gsoc2013-evolution-47ff96778e8d84e6906f3ae5e2f5a61147461ea6.tar.lz
gsoc2013-evolution-47ff96778e8d84e6906f3ae5e2f5a61147461ea6.tar.xz
gsoc2013-evolution-47ff96778e8d84e6906f3ae5e2f5a61147461ea6.tar.zst
gsoc2013-evolution-47ff96778e8d84e6906f3ae5e2f5a61147461ea6.zip
Fixes bug #44196 addressbook table view uses ASCII sort
2004-05-10 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com> Fixes bug #44196 addressbook table view uses ASCII sort svn path=/trunk/; revision=25851
Diffstat (limited to 'addressbook')
-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