aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2012-01-19 00:03:00 +0800
committerWill Thompson <will@willthompson.co.uk>2012-01-19 01:47:25 +0800
commitbe14bbb863d0fc83402f9307e5193175d77e6d0d (patch)
tree0b9948957a079678c2610ba4b42e37732892bee6 /libempathy-gtk
parent3030fa4e082c695fa25b564e513307f3423feaae (diff)
downloadgsoc2013-empathy-be14bbb863d0fc83402f9307e5193175d77e6d0d.tar
gsoc2013-empathy-be14bbb863d0fc83402f9307e5193175d77e6d0d.tar.gz
gsoc2013-empathy-be14bbb863d0fc83402f9307e5193175d77e6d0d.tar.bz2
gsoc2013-empathy-be14bbb863d0fc83402f9307e5193175d77e6d0d.tar.lz
gsoc2013-empathy-be14bbb863d0fc83402f9307e5193175d77e6d0d.tar.xz
gsoc2013-empathy-be14bbb863d0fc83402f9307e5193175d77e6d0d.tar.zst
gsoc2013-empathy-be14bbb863d0fc83402f9307e5193175d77e6d0d.zip
EmpathyChat: include should_highlight in ::new-message
This allows EmpathyChatWindow to use this rather than calling empathy_message_should_highlight() itself.
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index c8ef24809..267cdca2a 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1413,7 +1413,8 @@ chat_message_received (EmpathyChat *chat,
g_object_notify (G_OBJECT (chat), "nb-unread-messages");
}
- g_signal_emit (chat, signals[NEW_MESSAGE], 0, message, pending);
+ g_signal_emit (chat, signals[NEW_MESSAGE], 0, message, pending,
+ should_highlight);
}
/* We received a message so the contact is no longer
@@ -3299,6 +3300,14 @@ empathy_chat_class_init (EmpathyChatClass *klass)
G_TYPE_NONE,
1, G_TYPE_BOOLEAN);
+ /**
+ * EmpathyChat::new-message:
+ * @self: the #EmpathyChat
+ * @message: the new message
+ * @pending: whether the message was in the pending queue when @self
+ * was created
+ * @should_highlight: %TRUE if the message mentions the local user
+ */
signals[NEW_MESSAGE] =
g_signal_new ("new-message",
G_OBJECT_CLASS_TYPE (object_class),
@@ -3307,7 +3316,7 @@ empathy_chat_class_init (EmpathyChatClass *klass)
NULL, NULL,
g_cclosure_marshal_generic,
G_TYPE_NONE,
- 2, EMPATHY_TYPE_MESSAGE, G_TYPE_BOOLEAN);
+ 3, EMPATHY_TYPE_MESSAGE, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
signals[PART_COMMAND_ENTERED] =
g_signal_new ("part-command-entered",