]> git.0d.be Git - empathy.git/commitdiff
Move the 'Ungrouped' fake contact to the bottom of the contact list
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 9 Mar 2010 13:28:42 +0000 (14:28 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 15 Mar 2010 08:28:41 +0000 (09:28 +0100)
libempathy-gtk/empathy-contact-list-store.c

index 0d3c44447225f32a5b2e99be7133b4082e0b124a..f3e9a4b9ecd57cfa8777ef70f2c9a9bcf385939d 100644 (file)
@@ -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 */