diff options
author | Travis Reitter <treitter@gmail.com> | 2010-02-24 02:08:05 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-15 16:28:40 +0800 |
commit | 50a0138f16ceabeecd1ee92f127684a9d50b3e70 (patch) | |
tree | a4d995ff700cb3510ccd6c16c12d4e3c5a8a8f04 /libempathy-gtk/empathy-contact-list-store.c | |
parent | b8657a61fe72be0da2d91325b0851dd4d7fd533c (diff) | |
download | gsoc2013-empathy-50a0138f16ceabeecd1ee92f127684a9d50b3e70.tar gsoc2013-empathy-50a0138f16ceabeecd1ee92f127684a9d50b3e70.tar.gz gsoc2013-empathy-50a0138f16ceabeecd1ee92f127684a9d50b3e70.tar.bz2 gsoc2013-empathy-50a0138f16ceabeecd1ee92f127684a9d50b3e70.tar.lz gsoc2013-empathy-50a0138f16ceabeecd1ee92f127684a9d50b3e70.tar.xz gsoc2013-empathy-50a0138f16ceabeecd1ee92f127684a9d50b3e70.tar.zst gsoc2013-empathy-50a0138f16ceabeecd1ee92f127684a9d50b3e70.zip |
Add a favorite contacts build option and make Moblin support automatically turn it on.
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) { |