[empathy] contact-list-store: add a column saying if a group is a fake one or not



commit 18c1a21f066f5077ff487ffb92554fd1539ff997
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue Mar 9 17:14:43 2010 +0100

    contact-list-store: add a column saying if a group is a fake one or not

 libempathy-gtk/empathy-contact-list-store.c |   14 +++++++++-----
 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 26ff11c..de7e325 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 144113c..ec8aa3a 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;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]