aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-message.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-15 22:50:33 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-18 20:40:30 +0800
commite3a5d537c9604663f46ec6e82cf397781718a222 (patch)
tree5a10f64c1b53602e88f9f005fbe32e04838fcb45 /libempathy/empathy-message.c
parent6c45c22ef3b659f977221ad691638a073bcfa94e (diff)
downloadgsoc2013-empathy-e3a5d537c9604663f46ec6e82cf397781718a222.tar
gsoc2013-empathy-e3a5d537c9604663f46ec6e82cf397781718a222.tar.gz
gsoc2013-empathy-e3a5d537c9604663f46ec6e82cf397781718a222.tar.bz2
gsoc2013-empathy-e3a5d537c9604663f46ec6e82cf397781718a222.tar.lz
gsoc2013-empathy-e3a5d537c9604663f46ec6e82cf397781718a222.tar.xz
gsoc2013-empathy-e3a5d537c9604663f46ec6e82cf397781718a222.tar.zst
gsoc2013-empathy-e3a5d537c9604663f46ec6e82cf397781718a222.zip
remove empathy_message_new()
Diffstat (limited to 'libempathy/empathy-message.c')
-rw-r--r--libempathy/empathy-message.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index 520dbe650..53422b61a 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -269,14 +269,6 @@ message_set_property (GObject *object,
}
EmpathyMessage *
-empathy_message_new (const gchar *body)
-{
- return g_object_new (EMPATHY_TYPE_MESSAGE,
- "body", body,
- NULL);
-}
-
-EmpathyMessage *
empathy_message_from_tpl_log_event (TplEvent *logevent)
{
EmpathyMessage *retval = NULL;
@@ -321,7 +313,13 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
receiver = tpl_event_get_receiver (logevent);
sender = tpl_event_get_sender (logevent);
- retval = empathy_message_new (body);
+ retval = g_object_new (EMPATHY_TYPE_MESSAGE,
+ "type", tpl_text_event_get_message_type (TPL_TEXT_EVENT (logevent)),
+ "body", body,
+ "is-backlog", TRUE,
+ "timestamp", tpl_event_get_timestamp (logevent),
+ NULL);
+
if (receiver != NULL) {
contact = empathy_contact_from_tpl_contact (account, receiver);
empathy_message_set_receiver (retval, contact);
@@ -334,12 +332,6 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
g_object_unref (contact);
}
- empathy_message_set_timestamp (retval,
- tpl_event_get_timestamp (logevent));
- empathy_message_set_tptype (retval,
- tpl_text_event_get_message_type (TPL_TEXT_EVENT (logevent)));
- empathy_message_set_is_backlog (retval, TRUE);
-
g_free (body);
return retval;