aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-log-window.c
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-04-27 04:02:32 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-09 19:34:55 +0800
commit5ba374369d6d95bc48b46c2d39205512bf663358 (patch)
treebaaac04a49f6a0f30d46b5c9cf0a46c5ef1a83c0 /libempathy-gtk/empathy-log-window.c
parent11d6539fea44b435f42f43d1faac15c8e41a6bbf (diff)
downloadgsoc2013-empathy-5ba374369d6d95bc48b46c2d39205512bf663358.tar
gsoc2013-empathy-5ba374369d6d95bc48b46c2d39205512bf663358.tar.gz
gsoc2013-empathy-5ba374369d6d95bc48b46c2d39205512bf663358.tar.bz2
gsoc2013-empathy-5ba374369d6d95bc48b46c2d39205512bf663358.tar.lz
gsoc2013-empathy-5ba374369d6d95bc48b46c2d39205512bf663358.tar.xz
gsoc2013-empathy-5ba374369d6d95bc48b46c2d39205512bf663358.tar.zst
gsoc2013-empathy-5ba374369d6d95bc48b46c2d39205512bf663358.zip
LogWindow: Display /me messages properly
Diffstat (limited to 'libempathy-gtk/empathy-log-window.c')
-rw-r--r--libempathy-gtk/empathy-log-window.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index fbc3f4764..08d572ec8 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -711,10 +711,20 @@ log_window_append_chat_message (TplEvent *event,
get_parent_iter_for_message (event, message, &parent);
- body = g_strdup_printf (
- C_("First is a contact, second is what he said", "%s: %s"),
- tpl_entity_get_alias (tpl_event_get_sender (event)),
- empathy_message_get_body (message));
+ if (tpl_text_event_get_message_type (TPL_TEXT_EVENT (event))
+ == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION)
+ {
+ body = g_strdup_printf ("* %s %s",
+ tpl_entity_get_alias (tpl_event_get_sender (event)),
+ empathy_message_get_body (message));
+ }
+ else
+ {
+ body = g_strdup_printf (
+ C_("First is a contact, second is what he said", "%s: %s"),
+ tpl_entity_get_alias (tpl_event_get_sender (event)),
+ empathy_message_get_body (message));
+ }
gtk_tree_store_append (store, &iter, &parent);
gtk_tree_store_set (store, &iter,