diff options
author | Travis Reitter <treitter@gmail.com> | 2010-06-24 11:12:42 +0800 |
---|---|---|
committer | Travis Reitter <treitter@gmail.com> | 2010-07-21 07:12:35 +0800 |
commit | e54fe4814b321be3e32e99f7dfd49b93e392bded (patch) | |
tree | 8b6adc8ad37feb56510ec780c43f0a55c4424aec | |
parent | ae79986102a22b65a3f9f4eb2328971272eec204 (diff) | |
download | gsoc2013-empathy-e54fe4814b321be3e32e99f7dfd49b93e392bded.tar gsoc2013-empathy-e54fe4814b321be3e32e99f7dfd49b93e392bded.tar.gz gsoc2013-empathy-e54fe4814b321be3e32e99f7dfd49b93e392bded.tar.bz2 gsoc2013-empathy-e54fe4814b321be3e32e99f7dfd49b93e392bded.tar.lz gsoc2013-empathy-e54fe4814b321be3e32e99f7dfd49b93e392bded.tar.xz gsoc2013-empathy-e54fe4814b321be3e32e99f7dfd49b93e392bded.tar.zst gsoc2013-empathy-e54fe4814b321be3e32e99f7dfd49b93e392bded.zip |
Support contact removal
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-store.c | 10 | ||||
-rw-r--r-- | libempathy/empathy-individual-manager.c | 18 |
3 files changed, 25 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 17e0f5759..570c5c191 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c index 976053c07..a1a07a32c 100644 --- a/libempathy-gtk/empathy-individual-store.c +++ b/libempathy-gtk/empathy-individual-store.c @@ -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) { diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c index fe8ccadf9..53843ce93 100644 --- a/libempathy/empathy-individual-manager.c +++ b/libempathy/empathy-individual-manager.c @@ -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 |