]> git.0d.be Git - empathy.git/commitdiff
Display the fake 'Favorites' group at the top of the contact list
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 9 Mar 2010 14:42:18 +0000 (15:42 +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 b322ed7c103df1044c9433dac112175b9b5e1bb5..223d430efaccbd8400f3f55f6b284900ecacd709 100644 (file)
@@ -1582,11 +1582,15 @@ compare_separator_and_groups (gboolean is_separator_a,
                return -1;
        } else if (!contact_a && !contact_b) {
                /* Two groups. The 'Ungrouped' fake group is display at the bottom of the
-                * contact list. */
+                * contact list and the 'Favorites' at the top. */
                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 if (!tp_strdiff (name_a, EMPATHY_CONTACT_LIST_STORE_FAVORITE))
+                       return -1;
+               else if (!tp_strdiff (name_b, EMPATHY_CONTACT_LIST_STORE_FAVORITE))
+                       return 1;
                else
                        return g_utf8_collate (name_a, name_b);
        }