comparison src/conversation.c @ 4171:858822a27529

[gaim-migrate @ 4400] Alex Converse (alex4): "Gaim had a nasty habbit of not converting prefrenced colors from 48-bit to 24-bit for outputting as html. (causing malformed colors like #00FFFF00) I fixed this by doing all the conversions at the time of outputting." he further wrote, when i failed to see a need for this patch at first: "The issue is GdkColors are 48-bit (16 of Red, green, and blue) HTML colors are 24-bit (bit of Red, Green, and Blue) gaim stores colors as GdkColors but when sends the color as HTML. The problem is colors that were stored inb gaimrc never got downsampled to 24bit." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 02 Jan 2003 16:24:53 +0000
parents ebfb80bbe1ed
children cee489d38059
comparison
equal deleted inserted replaced
4170:11e643c9ef51 4171:858822a27529
1250 g_snprintf(buf2, limit, "<FONT SIZE=\"%d\">%s</FONT>", fontsize, buf); 1250 g_snprintf(buf2, limit, "<FONT SIZE=\"%d\">%s</FONT>", fontsize, buf);
1251 strcpy(buf, buf2); 1251 strcpy(buf, buf2);
1252 } 1252 }
1253 1253
1254 if ((font_options & OPT_FONT_FGCOL) || c->hasfg) { 1254 if ((font_options & OPT_FONT_FGCOL) || c->hasfg) {
1255 g_snprintf(buf2, limit, "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>", c->fgcol.red, 1255 g_snprintf(buf2, limit, "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>",
1256 c->fgcol.green, c->fgcol.blue, buf); 1256 c->fgcol.red/256, c->fgcol.green/256, c->fgcol.blue/256, buf);
1257 strcpy(buf, buf2); 1257 strcpy(buf, buf2);
1258 } 1258 }
1259 1259
1260 if ((font_options & OPT_FONT_BGCOL) || c->hasbg) { 1260 if ((font_options & OPT_FONT_BGCOL) || c->hasbg) {
1261 g_snprintf(buf2, limit, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", 1261 g_snprintf(buf2, limit, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>",
1262 c->bgcol.red, c->bgcol.green, c->bgcol.blue, buf); 1262 c->bgcol.red/256, c->bgcol.green/256, c->bgcol.blue/256, buf);
1263 strcpy(buf, buf2); 1263 strcpy(buf, buf2);
1264 } 1264 }
1265 } 1265 }
1266 1266
1267 quiet_set(c->bold, FALSE); 1267 quiet_set(c->bold, FALSE);