diff options
Diffstat (limited to 'libempathy-gtk/empathy-contact-list-store.c')
-rw-r--r-- | libempathy-gtk/empathy-contact-list-store.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c index 8592fe96f..72ba74695 100644 --- a/libempathy-gtk/empathy-contact-list-store.c +++ b/libempathy-gtk/empathy-contact-list-store.c @@ -1446,6 +1446,7 @@ contact_list_store_get_group (EmpathyContactListStore *store, EMPATHY_CONTACT_LIST_STORE_COL_IS_SEPARATOR, TRUE, -1); +#if HAVE_FAVOURITE_CONTACTS /* add a second separator for the favourite contacts group, to * always be sorted at the end. This will provide a visual * distinction between the end of the favourites and the @@ -1459,6 +1460,7 @@ contact_list_store_get_group (EmpathyContactListStore *store, EMPATHY_CONTACT_LIST_STORE_COL_IS_SEPARATOR, TRUE, -1); } +#endif /* HAVE_FAVOURITE_CONTACTS */ if (iter_separator_to_set) { *iter_separator_to_set = iter_separator; @@ -1513,6 +1515,7 @@ contact_list_store_state_sort_func (GtkTreeModel *model, /* Separator, favourites group, or other group? */ if (is_separator_a || is_separator_b) { if (is_separator_a) { +#if HAVE_FAVOURITE_CONTACTS /* sort the special favourites group 2nd separator at * the end */ if (!g_strcmp0 (name_a, EMPATHY_GROUP_FAVOURITES)) { @@ -1520,19 +1523,28 @@ contact_list_store_state_sort_func (GtkTreeModel *model, } else { ret_val = -1; } +#else + ret_val = -1; +#endif /* HAVE_FAVOURITE_CONTACTS */ } else if (is_separator_b) { +#if HAVE_FAVOURITE_CONTACTS if (!g_strcmp0 (name_b, EMPATHY_GROUP_FAVOURITES)) { ret_val = -1; } else { ret_val = 1; } +#else + ret_val = 1; +#endif /* HAVE_FAVOURITE_CONTACTS */ } +#if HAVE_FAVOURITE_CONTACTS } else if (!contact_a && !g_strcmp0 (name_a, EMPATHY_GROUP_FAVOURITES)) { ret_val = -1; } else if (!contact_b && !g_strcmp0 (name_b, EMPATHY_GROUP_FAVOURITES)) { ret_val = 1; +#endif /* HAVE_FAVOURITE_CONTACTS */ } else if (!contact_a && contact_b) { ret_val = 1; } else if (contact_a && !contact_b) { @@ -1599,6 +1611,7 @@ contact_list_store_name_sort_func (GtkTreeModel *model, if (is_separator_a || is_separator_b) { if (is_separator_a) { +#if HAVE_FAVOURITE_CONTACTS /* sort the special favourites group 2nd separator at * the end */ if (!g_strcmp0 (name_a, EMPATHY_GROUP_FAVOURITES)) { @@ -1606,19 +1619,28 @@ contact_list_store_name_sort_func (GtkTreeModel *model, } else { ret_val = -1; } +#else + ret_val = -1; +#endif /* HAVE_FAVOURITE_CONTACTS */ } else if (is_separator_b) { +#if HAVE_FAVOURITE_CONTACTS if (!g_strcmp0 (name_b, EMPATHY_GROUP_FAVOURITES)) { ret_val = -1; } else { ret_val = 1; } +#else + ret_val = 1; +#endif /* HAVE_FAVOURITE_CONTACTS */ } +#if HAVE_FAVOURITE_CONTACTS } else if (!contact_a && !g_strcmp0 (name_a, EMPATHY_GROUP_FAVOURITES)) { ret_val = -1; } else if (!contact_b && !g_strcmp0 (name_b, EMPATHY_GROUP_FAVOURITES)) { ret_val = 1; +#endif /* HAVE_FAVOURITE_CONTACTS */ } else if (!contact_a && contact_b) { ret_val = 1; } else if (contact_a && !contact_b) { |