diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-10 00:14:43 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-15 16:28:42 +0800 |
commit | 18c1a21f066f5077ff487ffb92554fd1539ff997 (patch) | |
tree | 927020ebe24ac491d615366a37e589cd7aa3cac7 /libempathy-gtk | |
parent | a1aabfa9396be10ba988a84d3e7aac0ec6f10ffa (diff) | |
download | gsoc2013-empathy-18c1a21f066f5077ff487ffb92554fd1539ff997.tar gsoc2013-empathy-18c1a21f066f5077ff487ffb92554fd1539ff997.tar.gz gsoc2013-empathy-18c1a21f066f5077ff487ffb92554fd1539ff997.tar.bz2 gsoc2013-empathy-18c1a21f066f5077ff487ffb92554fd1539ff997.tar.lz gsoc2013-empathy-18c1a21f066f5077ff487ffb92554fd1539ff997.tar.xz gsoc2013-empathy-18c1a21f066f5077ff487ffb92554fd1539ff997.tar.zst gsoc2013-empathy-18c1a21f066f5077ff487ffb92554fd1539ff997.zip |
contact-list-store: add a column saying if a group is a fake one or not
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-list-store.c | 14 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-list-store.h | 1 |
2 files changed, 10 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c index 26ff11cd2..de7e325e2 100644 --- a/libempathy-gtk/empathy-contact-list-store.c +++ b/libempathy-gtk/empathy-contact-list-store.c @@ -147,7 +147,8 @@ static void contact_list_store_get_group (EmpathyCon const gchar *name, GtkTreeIter *iter_group_to_set, GtkTreeIter *iter_separator_to_set, - gboolean *created); + gboolean *created, + gboolean is_fake_group); static gint contact_list_store_state_sort_func (GtkTreeModel *model, GtkTreeIter *iter_a, GtkTreeIter *iter_b, @@ -837,6 +838,7 @@ contact_list_store_setup (EmpathyContactListStore *store) G_TYPE_BOOLEAN, /* Can make video calls */ EMPATHY_TYPE_CONTACT_LIST_FLAGS, /* Flags */ G_TYPE_BOOLEAN, /* Is a favourite */ + G_TYPE_BOOLEAN, /* Is a fake group */ }; priv = GET_PRIV (store); @@ -1074,7 +1076,7 @@ contact_list_store_add_contact (EmpathyContactListStore *store, GtkTreeIter iter_group; contact_list_store_get_group (store, EMPATHY_CONTACT_LIST_STORE_UNGROUPED, - &iter_group, NULL, NULL); + &iter_group, NULL, NULL, TRUE); gtk_tree_store_insert_after (GTK_TREE_STORE (store), &iter, &iter_group, NULL); @@ -1108,7 +1110,7 @@ contact_list_store_add_contact (EmpathyContactListStore *store, for (l = groups; l; l = l->next) { GtkTreeIter iter_group; - contact_list_store_get_group (store, l->data, &iter_group, NULL, NULL); + contact_list_store_get_group (store, l->data, &iter_group, NULL, NULL, FALSE); gtk_tree_store_insert_after (GTK_TREE_STORE (store), &iter, &iter_group, NULL); @@ -1124,7 +1126,7 @@ contact_list_store_add_contact (EmpathyContactListStore *store, GtkTreeIter iter_group; contact_list_store_get_group (store, EMPATHY_CONTACT_LIST_STORE_FAVORITE, - &iter_group, NULL, NULL); + &iter_group, NULL, NULL, TRUE); gtk_tree_store_insert_after (GTK_TREE_STORE (store), &iter, &iter_group, NULL); @@ -1479,7 +1481,8 @@ contact_list_store_get_group (EmpathyContactListStore *store, const gchar *name, GtkTreeIter *iter_group_to_set, GtkTreeIter *iter_separator_to_set, - gboolean *created) + gboolean *created, + gboolean is_fake_group) { EmpathyContactListStorePriv *priv; GtkTreeModel *model; @@ -1510,6 +1513,7 @@ contact_list_store_get_group (EmpathyContactListStore *store, EMPATHY_CONTACT_LIST_STORE_COL_IS_GROUP, TRUE, EMPATHY_CONTACT_LIST_STORE_COL_IS_ACTIVE, FALSE, EMPATHY_CONTACT_LIST_STORE_COL_IS_SEPARATOR, FALSE, + EMPATHY_CONTACT_LIST_STORE_COL_IS_FAKE_GROUP, is_fake_group, -1); if (iter_group_to_set) { diff --git a/libempathy-gtk/empathy-contact-list-store.h b/libempathy-gtk/empathy-contact-list-store.h index 144113cc1..ec8aa3a13 100644 --- a/libempathy-gtk/empathy-contact-list-store.h +++ b/libempathy-gtk/empathy-contact-list-store.h @@ -64,6 +64,7 @@ typedef enum { EMPATHY_CONTACT_LIST_STORE_COL_CAN_VIDEO_CALL, EMPATHY_CONTACT_LIST_STORE_COL_FLAGS, EMPATHY_CONTACT_LIST_STORE_COL_IS_FAVOURITE, + EMPATHY_CONTACT_LIST_STORE_COL_IS_FAKE_GROUP, EMPATHY_CONTACT_LIST_STORE_COL_COUNT, } EmpathyContactListStoreCol; |