pidgin: 7744a116: Add some more messageClasses.
qulogic at pidgin.im
qulogic at pidgin.im
Wed Jan 4 02:08:44 EST 2012
----------------------------------------------------------------------
Revision: 7744a1161945bf8091948a36e86f56f6b51c1a96
Parent: 70db8f8eaf237a07041949913cb63d72afb708c2
Author: qulogic at pidgin.im
Date: 01/03/12 22:35:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7744a1161945bf8091948a36e86f56f6b51c1a96
Changelog:
Add some more messageClasses.
Changes against parent 70db8f8eaf237a07041949913cb63d72afb708c2
patched pidgin/gtkconv.c
-------------- next part --------------
============================================================
--- pidgin/gtkconv.c 4cd809b7260bcefb30aeab9687d22caf04394d2d
+++ pidgin/gtkconv.c db776f824b86f21fd0df2dd98060cbf60c867a2b
@@ -6132,9 +6132,20 @@ replace_message_tokens(
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");
char *format = NULL;
More information about the Commits
mailing list