[empathy] Move the 'Ungrouped' fake contact to the bottom of the contact list
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Move the 'Ungrouped' fake contact to the bottom of the contact list
- Date: Mon, 15 Mar 2010 08:30:25 +0000 (UTC)
commit 4ac942f53ca44bcfc1e3b8aa9329dddf014b44b8
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Mar 9 14:28:42 2010 +0100
Move the 'Ungrouped' fake contact to the bottom of the contact list
libempathy-gtk/empathy-contact-list-store.c | 10 ++++++++--
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 0d3c444..f3e9a4b 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]