aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-11 20:48:40 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-11 20:48:40 +0800
commit72e7c137e1ce5f45c93583540b04fc106b2656d1 (patch)
treecd677ec06bbbfbe53506e706be9e40497ffa3859 /libempathy-gtk/empathy-chat.c
parent8a8ba7a5697c6e5494854c99dc9aa4a7fc7a45bd (diff)
downloadgsoc2013-empathy-72e7c137e1ce5f45c93583540b04fc106b2656d1.tar
gsoc2013-empathy-72e7c137e1ce5f45c93583540b04fc106b2656d1.tar.gz
gsoc2013-empathy-72e7c137e1ce5f45c93583540b04fc106b2656d1.tar.bz2
gsoc2013-empathy-72e7c137e1ce5f45c93583540b04fc106b2656d1.tar.lz
gsoc2013-empathy-72e7c137e1ce5f45c93583540b04fc106b2656d1.tar.xz
gsoc2013-empathy-72e7c137e1ce5f45c93583540b04fc106b2656d1.tar.zst
gsoc2013-empathy-72e7c137e1ce5f45c93583540b04fc106b2656d1.zip
empathy_dispatcher_chat_with_contact_id: get a TpAccount instead of a TpConnection
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 399f0cc9b..9c6a632bc 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -228,18 +228,11 @@ chat_set_property (GObject *object,
}
static void
-reconnected_connection_ready_cb (TpConnection *connection,
- const GError *error,
- gpointer user_data)
+account_reconnected (EmpathyChat *chat,
+ TpAccount *account)
{
- EmpathyChat *chat = user_data;
EmpathyChatPriv *priv = GET_PRIV (chat);
- if (error != NULL) {
- DEBUG ("connection is not ready: %s", error->message);
- goto out;
- }
-
DEBUG ("Account reconnected, request a new Text channel");
/* FIXME: Ideally we should ask to handle ourself the channel so we can
@@ -248,10 +241,10 @@ reconnected_connection_ready_cb (TpConnection *connection,
switch (priv->handle_type) {
case TP_HANDLE_TYPE_CONTACT:
empathy_dispatcher_chat_with_contact_id (
- connection, priv->id, EMPATHY_DISPATCHER_NON_USER_ACTION);
+ account, priv->id, EMPATHY_DISPATCHER_NON_USER_ACTION);
break;
case TP_HANDLE_TYPE_ROOM:
- empathy_dispatcher_join_muc (connection,
+ empathy_dispatcher_join_muc (tp_account_get_connection (account),
priv->id, EMPATHY_DISPATCHER_NON_USER_ACTION);
break;
case TP_HANDLE_TYPE_NONE:
@@ -262,7 +255,6 @@ reconnected_connection_ready_cb (TpConnection *connection,
break;
}
-out:
g_object_unref (chat);
}
@@ -289,8 +281,8 @@ chat_new_connection_cb (TpAccount *account,
return;
g_object_ref (chat);
- tp_connection_call_when_ready (connection, reconnected_connection_ready_cb,
- chat);
+
+ account_reconnected (chat, account);
}
static void