]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-account-chooser.c
account-chooser: make sure that TP_ACCOUNT_FEATURE_CONNECTION and TP_CONNECTION_FEATU...
[empathy.git] / libempathy-gtk / empathy-account-chooser.c
index 5aa9854e5a393652de2664db23934b2803270fd8..e7f2bd5b7df463a6443b2ba408fe2a990c18321e 100644 (file)
@@ -171,6 +171,8 @@ G_DEFINE_TYPE (EmpathyAccountChooser, empathy_account_chooser,
 static void
 empathy_account_chooser_init (EmpathyAccountChooser *self)
 {
+  TpSimpleClientFactory *factory;
+
   self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
     EMPATHY_TYPE_ACCOUNT_CHOOSER, EmpathyAccountChooserPriv);
 
@@ -186,6 +188,14 @@ empathy_account_chooser_init (EmpathyAccountChooser *self)
 
   tp_g_signal_connect_object (self->priv->manager, "account-removed",
       G_CALLBACK (account_chooser_account_removed_cb), self, 0);
+
+  /* Make sure we'll have the capabilities feature on TpAccount's connection */
+  factory = tp_proxy_get_factory (self->priv->manager);
+
+  tp_simple_client_factory_add_account_features_varargs (factory,
+      TP_ACCOUNT_FEATURE_CONNECTION, NULL);
+  tp_simple_client_factory_add_connection_features_varargs (factory,
+      TP_CONNECTION_FEATURE_CAPABILITIES, NULL);
 }
 
 static gint