aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-message.c
diff options
context:
space:
mode:
authorNicolò Chieffo <84yelo3@gmail.com>2009-07-08 23:39:17 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-07-08 23:39:17 +0800
commitee5227403193fe7b5dae7d5c15e33d8a9c385c3f (patch)
tree16aa2e8ba09c4f780a94307a486ae1b28a02ea33 /libempathy/empathy-message.c
parentaff75bcc97abac0173dfd4cc6f9a959fbd493ae6 (diff)
downloadgsoc2013-empathy-ee5227403193fe7b5dae7d5c15e33d8a9c385c3f.tar
gsoc2013-empathy-ee5227403193fe7b5dae7d5c15e33d8a9c385c3f.tar.gz
gsoc2013-empathy-ee5227403193fe7b5dae7d5c15e33d8a9c385c3f.tar.bz2
gsoc2013-empathy-ee5227403193fe7b5dae7d5c15e33d8a9c385c3f.tar.lz
gsoc2013-empathy-ee5227403193fe7b5dae7d5c15e33d8a9c385c3f.tar.xz
gsoc2013-empathy-ee5227403193fe7b5dae7d5c15e33d8a9c385c3f.tar.zst
gsoc2013-empathy-ee5227403193fe7b5dae7d5c15e33d8a9c385c3f.zip
Support for history message in Adium themes. Use context HTMLs.
Diffstat (limited to 'libempathy/empathy-message.c')
-rw-r--r--libempathy/empathy-message.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index d020b72e4..41b44bfb3 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)