diff options
author | Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> | 2009-08-01 16:32:39 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> | 2009-08-01 16:32:39 +0800 |
commit | 3e8f25168aadd741ecc0fe8da4d1847eece5ff83 (patch) | |
tree | 69b2fc8984c98b9cad38d2ca5e8563da2b9aad8a /libempathy/empathy-message.c | |
parent | 41e5b31c1918f40c3ba47bff2dc9ab682fe0391f (diff) | |
parent | 87070d25c5f2d9a0ecba73e8ce913eca7f183c79 (diff) | |
download | gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar.gz gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar.bz2 gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar.lz gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar.xz gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.tar.zst gsoc2013-empathy-3e8f25168aadd741ecc0fe8da4d1847eece5ff83.zip |
Merge branch 'sjoerd-mc5' into mc5
Conflicts:
libempathy-gtk/empathy-account-widget.c
libempathy-gtk/empathy-protocol-chooser.c
Diffstat (limited to 'libempathy/empathy-message.c')
-rw-r--r-- | libempathy/empathy-message.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c index d020b72e4..a8fe6084c 100644 --- a/libempathy/empathy-message.c +++ b/libempathy/empathy-message.c @@ -39,6 +39,7 @@ typedef struct { EmpathyContact *receiver; gchar *body; time_t timestamp; + gboolean is_backlog; guint id; } EmpathyMessagePriv; @@ -61,6 +62,7 @@ enum { PROP_RECEIVER, PROP_BODY, PROP_TIMESTAMP, + PROP_IS_BACKLOG, }; static void @@ -112,6 +114,13 @@ empathy_message_class_init (EmpathyMessageClass *class) G_MAXLONG, -1, G_PARAM_READWRITE)); + g_object_class_install_property (object_class, + PROP_IS_BACKLOG, + g_param_spec_boolean ("is-backlog", + "History message", + "If the message belongs to history", + FALSE, + G_PARAM_READWRITE)); g_type_class_add_private (object_class, sizeof (EmpathyMessagePriv)); @@ -387,6 +396,33 @@ empathy_message_set_timestamp (EmpathyMessage *message, g_object_notify (G_OBJECT (message), "timestamp"); } +gboolean +empathy_message_is_backlog (EmpathyMessage *message) +{ + EmpathyMessagePriv *priv; + + g_return_val_if_fail (EMPATHY_IS_MESSAGE (message), FALSE); + + priv = GET_PRIV (message); + + return priv->is_backlog; +} + +void +empathy_message_set_is_backlog (EmpathyMessage *message, + gboolean is_backlog) +{ + EmpathyMessagePriv *priv; + + g_return_if_fail (EMPATHY_IS_MESSAGE (message)); + + priv = GET_PRIV (message); + + priv->is_backlog = is_backlog; + + g_object_notify (G_OBJECT (message), "is-backlog"); +} + #define IS_SEPARATOR(ch) (ch == ' ' || ch == ',' || ch == '.' || ch == ':') gboolean empathy_message_should_highlight (EmpathyMessage *message) |