[empathy: 9/19] Set 'token' and 'supersedes' for events from the logger
- From: Danielle Madeley <daniellem src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 9/19] Set 'token' and 'supersedes' for events from the logger
- Date: Mon, 20 Jun 2011 10:08:40 +0000 (UTC)
commit 7d48e0689c9c13bfeb7dbc21854a87dfc58a3005
Author: Danielle Madeley <danielle madeley collabora co uk>
Date: Fri May 20 15:25:46 2011 +1000
Set 'token' and 'supersedes' for events from the logger
configure.ac | 2 +-
libempathy/empathy-message.c | 13 ++++++++++---
2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c7053d8..fa6e8f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,7 +42,7 @@ LIBCANBERRA_GTK_REQUIRED=0.25
LIBNOTIFY_REQUIRED=0.7.0
TELEPATHY_FARSIGHT_REQUIRED=0.0.14
TELEPATHY_GLIB_REQUIRED=0.15.1
-TELEPATHY_LOGGER=0.2.8
+TELEPATHY_LOGGER=0.2.9.1
# Optional deps
CLUTTER_GTK_REQUIRED=0.90.3
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index d68309b..06913dc 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -341,7 +341,8 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
TpAccount *account = NULL;
TplEntity *receiver = NULL;
TplEntity *sender = NULL;
- gchar *body= NULL;
+ gchar *body = NULL;
+ const gchar *token = NULL, *supersedes = NULL;
EmpathyContact *contact;
TpChannelTextMessageType type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL;
@@ -364,14 +365,18 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
g_object_unref (acc_man);
if (TPL_IS_TEXT_EVENT (logevent)) {
- body = g_strdup (tpl_text_event_get_message (
- TPL_TEXT_EVENT (logevent)));
+ TplTextEvent *textevent = TPL_TEXT_EVENT (logevent);
+
+ body = g_strdup (tpl_text_event_get_message (textevent));
type = tpl_text_event_get_message_type (TPL_TEXT_EVENT (logevent));
+ token = tpl_text_event_get_message_token (textevent);
+ supersedes = tpl_text_event_get_supersedes_token (textevent);
}
#ifdef HAVE_CALL_LOGS
else if (TPL_IS_CALL_EVENT (logevent)) {
TplCallEvent *call = TPL_CALL_EVENT (logevent);
+
if (tpl_call_event_get_end_reason (call) == TPL_CALL_END_REASON_NO_ANSWER)
body = g_strdup_printf (_("Missed call from %s"),
tpl_entity_get_alias (tpl_event_get_sender (logevent)));
@@ -393,6 +398,8 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
retval = g_object_new (EMPATHY_TYPE_MESSAGE,
"type", type,
+ "token", token,
+ "supersedes", supersedes,
"body", body,
"is-backlog", TRUE,
"timestamp", tpl_event_get_timestamp (logevent),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]