Mercurial > pidgin
changeset 669:e871081839d0
[gaim-migrate @ 679]
i think i fixed that "don't resize" bug. lesson learned: don't play with gtkhtml.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 11 Aug 2000 05:50:26 +0000 |
parents | c9b66c710283 |
children | 9e51c1a4abba |
files | src/gtkhtml.c |
diffstat | 1 files changed, 27 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkhtml.c Fri Aug 11 05:15:43 2000 +0000 +++ b/src/gtkhtml.c Fri Aug 11 05:50:26 2000 +0000 @@ -3345,8 +3345,11 @@ if (sscanf(d, "%x", &colorv) && !(options & HTML_OPTION_NO_COLOURS)) { - current->color = get_color(colorv, map); - current->owncolor = 1; + if (colorv != 0xffffff || + !(display_options & OPT_DISP_IGN_WHITE)) { + current->color = get_color(colorv, map); + current->owncolor = 1; + } } else { @@ -3402,30 +3405,32 @@ } } } - else - if (!strncasecmp - (tag, "BODY BGCOLOR", strlen("BODY BGCOLOR"))) + else if (!strncasecmp(tag, "BODY", strlen("BODY"))) { - char *d = tag; - /* - * Ditch trailing \" - */ + char *d; current = push_state(current); - d += strlen("BODY BGCOLOR="); - if (*d == '\"') - d++; - if (*d == '#') - d++; - if (d[strlen(d) - 1] == '\"') - d[strlen(d) - 1] = 0; - if (sscanf(d, "%x", &colorv) - && !(options & HTML_OPTION_NO_COLOURS)) + html_strtok(tag, ' '); + while ((d = html_strtok(NULL, ' '))) { - if (colorv == 0xffffff && - !(display_options & OPT_DISP_IGN_WHITE)) { - current->bgcol = get_color(colorv, map); - current->ownbg = 1; + if (!strncasecmp(d, "BGCOLOR=", strlen("BGCOLOR="))) + { + d += strlen("COLOR="); + if (*d == '\"') + d++; + if (*d == '#') + d++; + if (d[strlen(d) - 1] == '\"') + d[strlen(d) - 1] = 0; + if (sscanf(d, "%x", &colorv) + && !(options & HTML_OPTION_NO_COLOURS)) + { + if (colorv == 0xffffff && + !(display_options & OPT_DISP_IGN_WHITE)) { + current->bgcol = get_color(colorv, map); + current->ownbg = 1; + } + } } } }