/pidgin/main: b31098549396: MXit: Display farewell messages in a...
Andrew Victor
andrew.victor at mxit.com
Tue Dec 18 08:54:13 EST 2012
Changeset: b310985493960f04f70de863b927781890a20df4
Author: Andrew Victor <andrew.victor at mxit.com>
Date: 2012-12-18 14:58 +0200
Branch: release-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/b31098549396
Description:
MXit: Display farewell messages in a different colour to distinguish them from normal messages.
diffstat:
ChangeLog | 4 ++++
libpurple/protocols/mxit/markup.c | 10 +++++++++-
libpurple/protocols/mxit/protocol.h | 1 +
3 files changed, 14 insertions(+), 1 deletions(-)
diffs (52 lines):
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,10 @@ version 2.10.7:
* Fix a crash when removing a user before its icon is loaded. (Mark
Barfield) (#15217)
+ MXit:
+ * Display farewell messages in a different colour to distinguish
+ them from normal messages.
+
Yahoo!:
* Fix a double-free in profile/picture loading code. (Mihai Serban)
(#15053)
diff --git a/libpurple/protocols/mxit/markup.c b/libpurple/protocols/mxit/markup.c
--- a/libpurple/protocols/mxit/markup.c
+++ b/libpurple/protocols/mxit/markup.c
@@ -59,7 +59,9 @@ struct tag {
};
-#define MXIT_VIBE_MSG_COLOR "#9933FF"
+#define MXIT_VIBE_MSG_COLOR "#9933FF"
+#define MXIT_FAREWELL_MSG_COLOR "#949494"
+
/* vibes */
static const char* vibes[] = {
@@ -994,6 +996,12 @@ void mxit_parse_markup( struct RXMsgData
break;
}
}
+
+ if ( msgflags & CP_MSG_FAREWELL ) {
+ /* this is a farewell message */
+ g_string_prepend( mx->msg, "<font color=\""MXIT_FAREWELL_MSG_COLOR"\"><i>" );
+ g_string_append( mx->msg, "</i></font>" );
+ }
}
diff --git a/libpurple/protocols/mxit/protocol.h b/libpurple/protocols/mxit/protocol.h
--- a/libpurple/protocols/mxit/protocol.h
+++ b/libpurple/protocols/mxit/protocol.h
@@ -158,6 +158,7 @@
#define CP_MSG_ENCRYPTED 0x0010 /* message is encrypted */
#define CP_MSG_MARKUP 0x0200 /* message may contain markup */
#define CP_MSG_EMOTICON 0x0400 /* message may contain custom emoticons */
+#define CP_MSG_FAREWELL 0x0800 /* this is a farewell message */
/* redirect types */
#define CP_REDIRECT_PERMANENT 1 /* permanent redirect */
More information about the Commits
mailing list