Mercurial > pidgin
comparison src/util.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 | d3c8d2b40494 |
children | af2eeb7f7cf8 |
comparison
equal
deleted
inserted
replaced
4170:11e643c9ef51 | 4171:858822a27529 |
---|---|
774 g_snprintf(tmp, length, "<FONT SIZE=\"%d\">%s</FONT>", fontsize, buf); | 774 g_snprintf(tmp, length, "<FONT SIZE=\"%d\">%s</FONT>", fontsize, buf); |
775 strcpy(buf, tmp); | 775 strcpy(buf, tmp); |
776 } | 776 } |
777 | 777 |
778 if (font_options & OPT_FONT_FGCOL) { | 778 if (font_options & OPT_FONT_FGCOL) { |
779 g_snprintf(tmp, length, "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>", fgcolor.red, | 779 g_snprintf(tmp, length, "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>", fgcolor.red/256, |
780 fgcolor.green, fgcolor.blue, buf); | 780 fgcolor.green/256, fgcolor.blue/256, buf); |
781 strcpy(buf, tmp); | 781 strcpy(buf, tmp); |
782 } | 782 } |
783 | 783 |
784 if (font_options & OPT_FONT_BGCOL) { | 784 if (font_options & OPT_FONT_BGCOL) { |
785 g_snprintf(tmp, length, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", bgcolor.red, | 785 g_snprintf(tmp, length, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", bgcolor.red/256, |
786 bgcolor.green, bgcolor.blue, buf); | 786 bgcolor.green/256, bgcolor.blue/256, buf); |
787 strcpy(buf, tmp); | 787 strcpy(buf, tmp); |
788 } | 788 } |
789 | 789 |
790 g_free(tmp); | 790 g_free(tmp); |
791 return buf; | 791 return buf; |