aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-15 22:41:25 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-18 20:40:30 +0800
commit6c45c22ef3b659f977221ad691638a073bcfa94e (patch)
treeaf7525c5e69436ea3bde76bb041a65e7129040c1 /libempathy-gtk
parent92ff1b9177bd6d8633b8d92357e5081db0e9554f (diff)
downloadgsoc2013-empathy-6c45c22ef3b659f977221ad691638a073bcfa94e.tar
gsoc2013-empathy-6c45c22ef3b659f977221ad691638a073bcfa94e.tar.gz
gsoc2013-empathy-6c45c22ef3b659f977221ad691638a073bcfa94e.tar.bz2
gsoc2013-empathy-6c45c22ef3b659f977221ad691638a073bcfa94e.tar.lz
gsoc2013-empathy-6c45c22ef3b659f977221ad691638a073bcfa94e.tar.xz
gsoc2013-empathy-6c45c22ef3b659f977221ad691638a073bcfa94e.tar.zst
gsoc2013-empathy-6c45c22ef3b659f977221ad691638a073bcfa94e.zip
use tp_text_channel_send_message_async()
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 2d906b0f4..53c4677fc 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -868,7 +868,7 @@ chat_command_me (EmpathyChat *chat,
GStrv strv)
{
EmpathyChatPriv *priv = GET_PRIV (chat);
- EmpathyMessage *message;
+ TpMessage *message;
TpChannel *channel;
channel = empathy_tp_chat_get_channel (priv->tp_chat);
@@ -888,12 +888,13 @@ chat_command_me (EmpathyChat *chat,
tmp = g_strdup_printf ("%s %s", empathy_contact_get_alias (self_contact),
strv[1]);
- message = empathy_message_new (tmp);
+ message = tp_client_message_new_text (TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
+ tmp);
g_free (tmp);
}
else {
- message = empathy_message_new (strv[1]);
- empathy_message_set_tptype (message, TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION);
+ message = tp_client_message_new_text (TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
+ strv[1]);
}
empathy_tp_chat_send (priv->tp_chat, message);
@@ -905,9 +906,10 @@ chat_command_say (EmpathyChat *chat,
GStrv strv)
{
EmpathyChatPriv *priv = GET_PRIV (chat);
- EmpathyMessage *message;
+ TpMessage *message;
- message = empathy_message_new (strv[1]);
+ message = tp_client_message_new_text (TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
+ strv[1]);
empathy_tp_chat_send (priv->tp_chat, message);
g_object_unref (message);
}
@@ -1074,7 +1076,7 @@ chat_send (EmpathyChat *chat,
const gchar *msg)
{
EmpathyChatPriv *priv;
- EmpathyMessage *message;
+ TpMessage *message;
guint i;
if (EMP_STR_EMPTY (msg)) {
@@ -1144,7 +1146,8 @@ chat_send (EmpathyChat *chat,
}
}
- message = empathy_message_new (msg);
+ message = tp_client_message_new_text (TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
+ msg);
empathy_tp_chat_send (priv->tp_chat, message);
g_object_unref (message);
}