[empathy] empathy-chat: use tp_account_channel_request_new_text()



commit a58c33ecd0e4cc738a7495477d53ae3aa8aa00a6
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon Feb 24 15:59:42 2014 +0100

    empathy-chat: use tp_account_channel_request_new_text()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725070

 libempathy-gtk/empathy-chat.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index daec195..f17bbbb 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -846,17 +846,13 @@ chat_command_msg_internal (EmpathyChat *chat,
        EmpathyChatPriv *priv = GET_PRIV (chat);
        ChatCommandMsgData *data;
        TpAccountChannelRequest *req;
-       GHashTable *request;
 
-       request = tp_asv_new (
-               TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT,
-               TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT,
-               TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING, contact_id,
-               NULL);
-
-       req = tp_account_channel_request_new (priv->account, request,
+       req = tp_account_channel_request_new_text (priv->account,
                empathy_get_current_action_time ());
 
+       tp_account_channel_request_set_target_id (req, TP_HANDLE_TYPE_CONTACT,
+               contact_id);
+
        /* FIXME: We should probably search in members alias. But this
         * is enough for IRC */
        data = g_slice_new (ChatCommandMsgData);
@@ -867,7 +863,6 @@ chat_command_msg_internal (EmpathyChat *chat,
                EMPATHY_CHAT_TP_BUS_NAME, NULL, chat_command_msg_cb, data);
 
        g_object_unref (req);
-       g_hash_table_unref (request);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]