aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorTravis Reitter <treitter@gmail.com>2010-03-06 09:45:44 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-15 16:28:40 +0800
commit79ef79c4d92cc4978dd12528d5bb6c3673a6b0f9 (patch)
treec87f0c760ab4d8b4c02963a284ad9dc75e7f722c /libempathy-gtk
parent50a0138f16ceabeecd1ee92f127684a9d50b3e70 (diff)
downloadgsoc2013-empathy-79ef79c4d92cc4978dd12528d5bb6c3673a6b0f9.tar
gsoc2013-empathy-79ef79c4d92cc4978dd12528d5bb6c3673a6b0f9.tar.gz
gsoc2013-empathy-79ef79c4d92cc4978dd12528d5bb6c3673a6b0f9.tar.bz2
gsoc2013-empathy-79ef79c4d92cc4978dd12528d5bb6c3673a6b0f9.tar.lz
gsoc2013-empathy-79ef79c4d92cc4978dd12528d5bb6c3673a6b0f9.tar.xz
gsoc2013-empathy-79ef79c4d92cc4978dd12528d5bb6c3673a6b0f9.tar.zst
gsoc2013-empathy-79ef79c4d92cc4978dd12528d5bb6c3673a6b0f9.zip
Cut out the concept of a special Favourites group
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c60
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c7
2 files changed, 2 insertions, 65 deletions
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index 72ba74695..c68edb16d 100644
--- a/libempathy-gtk/empathy-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -1446,22 +1446,6 @@ 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
- * beginning of the ungrouped contacts */
- if (!g_strcmp0 (name, EMPATHY_GROUP_FAVOURITES)) {
- gtk_tree_store_append (GTK_TREE_STORE (store),
- &iter_separator,
- &iter_group);
- gtk_tree_store_set (GTK_TREE_STORE (store), &iter_separator,
- EMPATHY_CONTACT_LIST_STORE_COL_NAME, EMPATHY_GROUP_FAVOURITES,
- EMPATHY_CONTACT_LIST_STORE_COL_IS_SEPARATOR, TRUE,
- -1);
- }
-#endif /* HAVE_FAVOURITE_CONTACTS */
-
if (iter_separator_to_set) {
*iter_separator_to_set = iter_separator;
}
@@ -1515,27 +1499,9 @@ 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)) {
- ret_val = 1;
- } 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,
@@ -1611,36 +1577,14 @@ 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)) {
- ret_val = 1;
- } 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)) {
+ } else if (is_favourite_a && !is_favourite_b) {
ret_val = -1;
- } else if (!contact_b && !g_strcmp0 (name_b,
- EMPATHY_GROUP_FAVOURITES)) {
+ } else if (!is_favourite_a && is_favourite_b) {
ret_val = 1;
-#endif /* HAVE_FAVOURITE_CONTACTS */
} else if (!contact_a && contact_b) {
ret_val = 1;
} else if (contact_a && !contact_b) {
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index bd432f261..15d0926e7 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -992,13 +992,6 @@ contact_list_view_text_cell_data_func (GtkTreeViewColumn *tree_column,
EMPATHY_CONTACT_LIST_STORE_COL_NAME, &name,
-1);
-#if HAVE_FAVOURITE_CONTACTS
- if (is_group && !g_strcmp0 (name, EMPATHY_GROUP_FAVOURITES)) {
- g_free (name);
- name = g_strdup (_(EMPATHY_GROUP_FAVOURITES));
- }
-#endif /* HAVE_FAVOURITE_CONTACTS */
-
g_object_set (cell,
"show-status", show_status,
"text", name,