Mercurial > pidgin
changeset 831:97f1ae636ed7
[gaim-migrate @ 841]
the away message page is about to get a major overhaul
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 02 Sep 2000 09:02:47 +0000 |
parents | 60284aef22f0 |
children | 0142b4c66394 |
files | src/server.c src/util.c |
diffstat | 2 files changed, 28 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/server.c Sat Sep 02 08:42:40 2000 +0000 +++ b/src/server.c Sat Sep 02 09:02:47 2000 +0000 @@ -635,7 +635,9 @@ if ((general_options & OPT_GEN_TIK_HACK) && awaymessage && !strcmp(message, ">>>Automated Message: Getting Away Message<<<")) { - serv_send_im(name, awaymessage->message, 1); + char *tmpmsg = stylize(awaymessage->message, MSG_LEN); + serv_send_im(name, tmpmsg, 1); + g_free(tmpmsg); return; } @@ -699,6 +701,8 @@ escape_text(tmpmsg); escape_message(tmpmsg); serv_send_im(name, away_subs(tmpmsg, name), 1); + g_free(tmpmsg); + tmpmsg = stylize(awaymessage->message, MSG_LEN); if (is_idle == -1) is_idle = 1;
--- a/src/util.c Sat Sep 02 08:42:40 2000 +0000 +++ b/src/util.c Sat Sep 02 09:02:47 2000 +0000 @@ -1115,20 +1115,37 @@ buf = g_malloc(length); g_snprintf(buf, length, "%s", text); - if (font_options & OPT_FONT_FACE) - { + if (font_options & OPT_FONT_BOLD) { + g_snprintf(tmp, length, "<B>%s</B>", buf); + strcpy(buf, tmp); + } + + if (font_options & OPT_FONT_ITALIC) { + g_snprintf(tmp, length, "<I>%s</I>", buf); + strcpy(buf, tmp); + } + + if (font_options & OPT_FONT_UNDERLINE) { + g_snprintf(tmp, length, "<U>%s</U>", buf); + strcpy(buf, tmp); + } + + if (font_options & OPT_FONT_STRIKE) { + g_snprintf(tmp, length, "<S>%s</S>", buf); + strcpy(buf, tmp); + } + + if (font_options & OPT_FONT_FACE) { g_snprintf(tmp, length, "<FONT FACE=\"%s\">%s</FONT>", fontface, buf); strcpy(buf, tmp); } - if (font_options & OPT_FONT_FGCOL) - { + if (font_options & OPT_FONT_FGCOL) { g_snprintf(tmp, length, "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>", fgcolor.red, fgcolor.green, fgcolor.blue, buf); strcpy(buf, tmp); } - if (font_options & OPT_FONT_BGCOL) - { + if (font_options & OPT_FONT_BGCOL) { g_snprintf(tmp, length, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", bgcolor.red, bgcolor.green, bgcolor.blue, buf); strcpy(buf, tmp); }