]> git.0d.be Git - empathy.git/commitdiff
Support contact removal
authorTravis Reitter <treitter@gmail.com>
Thu, 24 Jun 2010 03:12:42 +0000 (20:12 -0700)
committerTravis Reitter <treitter@gmail.com>
Tue, 20 Jul 2010 23:12:35 +0000 (16:12 -0700)
configure.ac
libempathy-gtk/empathy-individual-store.c
libempathy/empathy-individual-manager.c

index 17e0f5759901be5da1ff7745dff8e7bc9d842858..570c5c19139407db3a4e80d286de3abc189b259f 100644 (file)
@@ -31,7 +31,7 @@ AC_COPYRIGHT([
 # Minimal version required
 
 # Hardp deps
-FOLKS_REQUIRED=0.1.2
+FOLKS_REQUIRED=0.1.3
 GCONF_REQUIRED=1.2.0
 GLIB_REQUIRED=2.25.9
 GTK_REQUIRED=2.21.2
index 976053c078370fc71cead1844895f1f012cde697..a1a07a32c0bf2a3105862b6fce8ad626025fb5ce 100644 (file)
@@ -353,6 +353,9 @@ individual_store_add_individual (EmpathyIndividualStore *self,
   GtkTreeIter iter;
   GHashTable *group_set = NULL;
   GList *groups = NULL, *l;
+  EmpathyIndividualManager *manager;
+  EmpathyContact *contact;
+  TpConnection *connection;
   EmpathyIndividualManagerFlags flags = 0;
 
   priv = GET_PRIV (self);
@@ -369,8 +372,11 @@ individual_store_add_individual (EmpathyIndividualStore *self,
       groups = g_hash_table_get_keys (group_set);
     }
 
-  /* TODO: implement */
-  DEBUG ("group capability flags not implemented");
+  manager = empathy_individual_manager_dup_singleton ();
+  contact = empathy_contact_from_folks_individual (individual);
+  connection = empathy_contact_get_connection (contact);
+  flags = empathy_individual_manager_get_flags_for_connection (manager,
+      connection);
 
   if (!groups)
     {
index fe8ccadf915e7d1b9232f72e638f823f5bff393b..53843ce93d7702f223beef4c5976504dff09efa6 100644 (file)
@@ -310,13 +310,27 @@ empathy_individual_manager_add_from_contact (EmpathyIndividualManager *self,
   g_hash_table_destroy (details);
 }
 
+/**
+ * Removes the inner contact from the server (and thus the Individual). Not
+ * meant for de-shelling inner personas from an Individual.
+ */
 void
 empathy_individual_manager_remove (EmpathyIndividualManager *self,
     FolksIndividual *individual,
     const gchar *message)
 {
-  /* TODO: implement */
-  DEBUG (G_STRLOC ": individual removal not implemented");
+  EmpathyIndividualManagerPriv *priv;
+
+  g_return_if_fail (EMPATHY_IS_INDIVIDUAL_MANAGER (self));
+  g_return_if_fail (FOLKS_IS_INDIVIDUAL (individual));
+
+  priv = GET_PRIV (self);
+
+  DEBUG (G_STRLOC ": removing individual %s (%s)",
+      folks_individual_get_id (individual),
+      folks_individual_get_alias (individual));
+
+  folks_individual_aggregator_remove_individual (priv->aggregator, individual);
 }
 
 EmpathyIndividualManagerFlags