changeset 32447:e066ed525ac8

Add some more messageClasses.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 04 Jan 2012 03:35:36 +0000
parents aeaf9eebd5ec
children 1f372ac4a100
files pidgin/gtkconv.c
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Wed Jan 04 02:49:34 2012 +0000
+++ b/pidgin/gtkconv.c	Wed Jan 04 03:35:36 2012 +0000
@@ -6132,8 +6132,19 @@
 			replace = message;
 
 		} else if (g_str_has_prefix(cur, "%messageClasses%")) {
-			replace = flags & PURPLE_MESSAGE_SEND ? "outgoing" :
-				  flags & PURPLE_MESSAGE_RECV ? "incoming" : "event";
+			GString *classes = g_string_new(NULL);
+#define ADD_CLASS(f, class) \
+			if (flags & f) \
+				g_string_append(classes, class);
+			ADD_CLASS(PURPLE_MESSAGE_SEND, "outgoing ");
+			ADD_CLASS(PURPLE_MESSAGE_RECV, "incoming ");
+			ADD_CLASS(PURPLE_MESSAGE_SYSTEM, "event ");
+			ADD_CLASS(PURPLE_MESSAGE_AUTO_RESP, "autoreply ");
+			ADD_CLASS(PURPLE_MESSAGE_DELAYED, "history ");
+			ADD_CLASS(PURPLE_MESSAGE_NICK, "mention ");
+#undef ADD_CLASS
+
+			replace = freeval = g_string_free(classes, FALSE);
 
 		} else if (g_str_has_prefix(cur, "%time")) {
 			const char *tmp = cur + strlen("%time");