[empathy: 36/80] LogWindow: Display /me messages properly
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 36/80] LogWindow: Display /me messages properly
- Date: Fri, 10 Jun 2011 08:42:11 +0000 (UTC)
commit 5ba374369d6d95bc48b46c2d39205512bf663358
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Tue Apr 26 21:02:32 2011 +0100
LogWindow: Display /me messages properly
libempathy-gtk/empathy-log-window.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index fbc3f47..08d572e 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]