aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-client-factory.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-08 21:06:49 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-24 19:28:44 +0800
commitcbeb879c831699105fb6943e55caa8bcf72f8eaf (patch)
treeda480b3deaf33dca0da2acbe0ec9de175c7d287d /libempathy/empathy-client-factory.c
parentef0d55ead126f53aa4544877d2df5ab712f00f28 (diff)
downloadgsoc2013-empathy-cbeb879c831699105fb6943e55caa8bcf72f8eaf.tar
gsoc2013-empathy-cbeb879c831699105fb6943e55caa8bcf72f8eaf.tar.gz
gsoc2013-empathy-cbeb879c831699105fb6943e55caa8bcf72f8eaf.tar.bz2
gsoc2013-empathy-cbeb879c831699105fb6943e55caa8bcf72f8eaf.tar.lz
gsoc2013-empathy-cbeb879c831699105fb6943e55caa8bcf72f8eaf.tar.xz
gsoc2013-empathy-cbeb879c831699105fb6943e55caa8bcf72f8eaf.tar.zst
gsoc2013-empathy-cbeb879c831699105fb6943e55caa8bcf72f8eaf.zip
add EMPATHY_INDIVIDUAL_FEATURE_ADD_CONTACT
https://bugzilla.gnome.org/show_bug.cgi?id=663387
Diffstat (limited to 'libempathy/empathy-client-factory.c')
-rw-r--r--libempathy/empathy-client-factory.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libempathy/empathy-client-factory.c b/libempathy/empathy-client-factory.c
index edc5463c9..a02b8b144 100644
--- a/libempathy/empathy-client-factory.c
+++ b/libempathy/empathy-client-factory.c
@@ -170,6 +170,24 @@ empathy_client_factory_dup_connection_features (TpSimpleClientFactory *factory,
return features;
}
+static GArray *
+empathy_client_factory_dup_contact_features (TpSimpleClientFactory *factory,
+ TpConnection *connection)
+{
+ GArray *features;
+ TpContactFeature feature;
+
+ features = chainup->dup_contact_features (factory, connection);
+
+ /* Needed by empathy_individual_add_menu_item_new to check if a contact is
+ * already in the contact list. This feature is pretty cheap to prepare as
+ * it doesn't prepare the full roster. */
+ feature = TP_CONTACT_FEATURE_SUBSCRIPTION_STATES;
+ g_array_append_val (features, feature);
+
+ return features;
+}
+
static void
empathy_client_factory_class_init (EmpathyClientFactoryClass *cls)
{
@@ -184,6 +202,9 @@ empathy_client_factory_class_init (EmpathyClientFactoryClass *cls)
simple_class->dup_connection_features =
empathy_client_factory_dup_connection_features;
+
+ simple_class->dup_contact_features =
+ empathy_client_factory_dup_contact_features;
}
static void