aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-11 18:43:34 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-11 21:10:43 +0800
commit6b5d8ab2badd9aee642a45b1c49e9aad265d201f (patch)
treeaede257d72b8feebb762935e2a1305c8b4fbaa73
parent5ff09cda5bad6b821509876c0fac51c667318602 (diff)
downloadgsoc2013-empathy-6b5d8ab2badd9aee642a45b1c49e9aad265d201f.tar
gsoc2013-empathy-6b5d8ab2badd9aee642a45b1c49e9aad265d201f.tar.gz
gsoc2013-empathy-6b5d8ab2badd9aee642a45b1c49e9aad265d201f.tar.bz2
gsoc2013-empathy-6b5d8ab2badd9aee642a45b1c49e9aad265d201f.tar.lz
gsoc2013-empathy-6b5d8ab2badd9aee642a45b1c49e9aad265d201f.tar.xz
gsoc2013-empathy-6b5d8ab2badd9aee642a45b1c49e9aad265d201f.tar.zst
gsoc2013-empathy-6b5d8ab2badd9aee642a45b1c49e9aad265d201f.zip
use tp_channel_get_connection()
tp_channel_get_connection() has been deprecated.
-rw-r--r--libempathy-gtk/empathy-chat.c8
-rw-r--r--libempathy/empathy-tp-chat.c4
-rw-r--r--src/empathy-call-window.c4
-rw-r--r--src/empathy-chat-window.c4
-rw-r--r--src/empathy-invite-participant-dialog.c4
5 files changed, 12 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 308587b52..917f4c02e 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -754,7 +754,7 @@ nick_command_supported (EmpathyChat *chat)
EmpathyChatPriv * priv = GET_PRIV (chat);
TpConnection *connection;
- connection = tp_channel_borrow_connection (TP_CHANNEL (priv->tp_chat));
+ connection = tp_channel_get_connection (TP_CHANNEL (priv->tp_chat));
return tp_proxy_has_interface_by_id (connection,
EMP_IFACE_QUARK_CONNECTION_INTERFACE_RENAMING);
}
@@ -988,7 +988,7 @@ chat_command_whois (EmpathyChat *chat,
TpConnection *conn;
EmpathyClientFactory *factory;
- conn = tp_channel_borrow_connection ((TpChannel *) priv->tp_chat);
+ conn = tp_channel_get_connection ((TpChannel *) priv->tp_chat);
factory = empathy_client_factory_dup ();
/* Element 0 of 'strv' is "whois"; element 1 is the contact ID
@@ -1534,7 +1534,7 @@ append_balance_error (EmpathyChat *chat,
const gchar *message_body)
{
EmpathyChatPriv *priv = GET_PRIV (chat);
- TpConnection *conn = tp_channel_borrow_connection (TP_CHANNEL (priv->tp_chat));
+ TpConnection *conn = tp_channel_get_connection (TP_CHANNEL (priv->tp_chat));
const gchar *uri = tp_connection_get_balance_uri (conn);
const gchar *error = _("insufficient balance to send message");
gchar *str, *str_markup = NULL;
@@ -3339,7 +3339,7 @@ chat_constructed (GObject *object)
if (priv->tp_chat != NULL) {
TpChannel *channel = TP_CHANNEL (priv->tp_chat);
- TpConnection *conn = tp_channel_borrow_connection (channel);
+ TpConnection *conn = tp_channel_get_connection (channel);
gboolean supports_avatars =
tp_proxy_has_interface_by_id (conn,
TP_IFACE_QUARK_CONNECTION_INTERFACE_AVATARS);
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 9dfb95d2f..d6a0e13c9 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -1119,7 +1119,7 @@ empathy_tp_chat_get_account (EmpathyTpChat *self)
g_return_val_if_fail (EMPATHY_IS_TP_CHAT (self), NULL);
- connection = tp_channel_borrow_connection (TP_CHANNEL (self));
+ connection = tp_channel_get_connection (TP_CHANNEL (self));
return tp_connection_get_account (connection);
}
@@ -1287,7 +1287,7 @@ tp_chat_prepare_ready_async (TpProxy *proxy,
self->priv->ready_result = g_simple_async_result_new (G_OBJECT (self),
callback, user_data, tp_chat_prepare_ready_async);
- connection = tp_channel_borrow_connection (channel);
+ connection = tp_channel_get_connection (channel);
if (tp_proxy_has_interface_by_id (self,
TP_IFACE_QUARK_CHANNEL_INTERFACE_PASSWORD))
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 749b4c6f3..5a3b0d88a 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -3037,7 +3037,7 @@ media_stream_error_to_txt (EmpathyCallWindow *self,
case TP_MEDIA_STREAM_ERROR_INVALID_CM_BEHAVIOR:
tp_connection_parse_object_path (
- tp_channel_borrow_connection (TP_CHANNEL (call)),
+ tp_channel_get_connection (TP_CHANNEL (call)),
NULL, &cm);
url = g_strdup_printf ("http://bugs.freedesktop.org/enter_bug.cgi?"
@@ -3124,7 +3124,7 @@ show_balance_error (EmpathyCallWindow *self)
"call-channel", &call,
NULL);
- conn = tp_channel_borrow_connection (call);
+ conn = tp_channel_get_connection (call);
g_object_unref (call);
uri = tp_connection_get_balance_uri (conn);
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 0c01617bb..6231b57b3 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -584,7 +584,7 @@ chat_window_conversation_menu_update (EmpathyChatWindow *self)
if (tp_chat != NULL)
{
- connection = tp_channel_borrow_connection (TP_CHANNEL (tp_chat));
+ connection = tp_channel_get_connection (TP_CHANNEL (tp_chat));
sensitive = empathy_tp_chat_can_add_contact (tp_chat) &&
(tp_connection_get_status (connection, NULL) ==
@@ -2037,7 +2037,7 @@ drag_data_received_individual_id (EmpathyChatWindow *self,
goto out;
}
- conn = tp_channel_borrow_connection ((TpChannel *) chat);
+ conn = tp_channel_get_connection ((TpChannel *) chat);
tp_contact = empathy_get_tp_contact_for_individual (individual, conn);
if (tp_contact == NULL)
{
diff --git a/src/empathy-invite-participant-dialog.c b/src/empathy-invite-participant-dialog.c
index ecbf00be9..8588b8484 100644
--- a/src/empathy-invite-participant-dialog.c
+++ b/src/empathy-invite-participant-dialog.c
@@ -114,7 +114,7 @@ get_tp_contact_for_chat (EmpathyInviteParticipantDialog *self,
{
TpConnection *chat_conn;
- chat_conn = tp_channel_borrow_connection (TP_CHANNEL (self->priv->tp_chat));
+ chat_conn = tp_channel_get_connection (TP_CHANNEL (self->priv->tp_chat));
if (chat_conn == NULL)
return NULL;
@@ -177,7 +177,7 @@ has_contact_list (EmpathyInviteParticipantDialog *self)
{
TpConnection *conn;
- conn = tp_channel_borrow_connection (TP_CHANNEL (self->priv->tp_chat));
+ conn = tp_channel_get_connection (TP_CHANNEL (self->priv->tp_chat));
return tp_proxy_has_interface_by_id (conn,
TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_LIST);