Mercurial > pidgin
comparison src/util.c @ 764:a566fc987db9
[gaim-migrate @ 774]
apply default fonts and colors to an away message
committer: Tailor Script <tailor@pidgin.im>
author | Todd Kulesza <fflewddur> |
---|---|
date | Fri, 25 Aug 2000 04:17:06 +0000 |
parents | 9389216aae29 |
children | bf31bf916f53 |
comparison
equal
deleted
inserted
replaced
763:4aeb969c70c9 | 764:a566fc987db9 |
---|---|
1104 } | 1104 } |
1105 } | 1105 } |
1106 | 1106 |
1107 return; | 1107 return; |
1108 } | 1108 } |
1109 | |
1110 void stylize(gchar *text, int length) | |
1111 { | |
1112 gchar *buf; | |
1113 | |
1114 buf = g_malloc(length); | |
1115 | |
1116 if (font_options & OPT_FONT_FACE) | |
1117 { | |
1118 g_snprintf(buf, length, "<FONT FACE=\"%s\">%s</FONT>", fontface, text); | |
1119 strcpy(text, buf); | |
1120 } | |
1121 | |
1122 if (font_options & OPT_FONT_FGCOL) | |
1123 { | |
1124 g_snprintf(buf, length, "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>", fgcolor.red, fgcolor.green, fgcolor.blue, text); | |
1125 strcpy(text, buf); | |
1126 } | |
1127 | |
1128 if (font_options & OPT_FONT_BGCOL) | |
1129 { | |
1130 g_snprintf(buf, length, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", bgcolor.red, bgcolor.green, bgcolor.blue, text); | |
1131 strcpy(text, buf); | |
1132 } | |
1133 | |
1134 g_free(buf); | |
1135 } |