[empathy: 9/19] remove empathy_message_new()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 9/19] remove empathy_message_new()
- Date: Wed, 20 Apr 2011 07:50:53 +0000 (UTC)
commit e3a5d537c9604663f46ec6e82cf397781718a222
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Apr 15 16:50:33 2011 +0200
remove empathy_message_new()
libempathy/empathy-message.c | 22 +++++++---------------
libempathy/empathy-message.h | 1 -
2 files changed, 7 insertions(+), 16 deletions(-)
---
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index 520dbe6..53422b6 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;
diff --git a/libempathy/empathy-message.h b/libempathy/empathy-message.h
index cb57f07..fd608b1 100644
--- a/libempathy/empathy-message.h
+++ b/libempathy/empathy-message.h
@@ -55,7 +55,6 @@ struct _EmpathyMessageClass {
GType empathy_message_get_type (void) G_GNUC_CONST;
-EmpathyMessage * empathy_message_new (const gchar *body);
EmpathyMessage * empathy_message_from_tpl_log_event (TplEvent *logevent);
EmpathyMessage * empathy_message_new_from_tp_message (TpMessage *tp_msg,
gboolean incoming);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]