aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-09 21:28:42 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-15 16:28:41 +0800
commit4ac942f53ca44bcfc1e3b8aa9329dddf014b44b8 (patch)
tree9cc716a3310df60636d135fdda507da6f4b4249a
parent3828abfc717a381003c81119dc96ef93b3d69d50 (diff)
downloadgsoc2013-empathy-4ac942f53ca44bcfc1e3b8aa9329dddf014b44b8.tar
gsoc2013-empathy-4ac942f53ca44bcfc1e3b8aa9329dddf014b44b8.tar.gz
gsoc2013-empathy-4ac942f53ca44bcfc1e3b8aa9329dddf014b44b8.tar.bz2
gsoc2013-empathy-4ac942f53ca44bcfc1e3b8aa9329dddf014b44b8.tar.lz
gsoc2013-empathy-4ac942f53ca44bcfc1e3b8aa9329dddf014b44b8.tar.xz
gsoc2013-empathy-4ac942f53ca44bcfc1e3b8aa9329dddf014b44b8.tar.zst
gsoc2013-empathy-4ac942f53ca44bcfc1e3b8aa9329dddf014b44b8.zip
Move the 'Ungrouped' fake contact to the bottom of the contact list
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index 0d3c44447..f3e9a4b9e 100644
--- a/libempathy-gtk/empathy-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -1566,8 +1566,14 @@ compare_separator_and_groups (gboolean is_separator_a,
} else if (contact_a && !contact_b) {
return -1;
} else if (!contact_a && !contact_b) {
- /* Two groups */
- return g_utf8_collate (name_a, name_b);
+ /* Two groups. The 'Ungrouped' fake group is display at the bottom of the
+ * contact list. */
+ if (!tp_strdiff (name_a, EMPATHY_CONTACT_LIST_STORE_UNGROUPED))
+ return 1;
+ else if (!tp_strdiff (name_b, EMPATHY_CONTACT_LIST_STORE_UNGROUPED))
+ return -1;
+ else
+ return g_utf8_collate (name_a, name_b);
}
/* Two contacts, ordering depends of the sorting policy */