Mercurial > pidgin.yaz
comparison src/gtkhtml.c @ 851:2cee5577224b
[gaim-migrate @ 861]
yay, better gtkhtml. god damn, i don't think our gtkhtml widget has been hacked this much in 2 years as is has been in 3 days.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 07 Sep 2000 05:50:07 +0000 |
parents | 902be73a6a43 |
children | 836d5a02a35c |
comparison
equal
deleted
inserted
replaced
850:902be73a6a43 | 851:2cee5577224b |
---|---|
2893 maxwidth = (hwidth - html->current_x - 8); | 2893 maxwidth = (hwidth - html->current_x - 8); |
2894 /* | 2894 /* |
2895 * HTK_SCROLLED_WINDOW(GTK_WIDGET(layout)->parent)->vscrollbar->allocation.width) - 8; | 2895 * HTK_SCROLLED_WINDOW(GTK_WIDGET(layout)->parent)->vscrollbar->allocation.width) - 8; |
2896 */ | 2896 */ |
2897 | 2897 |
2898 if ((maxwidth == (hwidth - 8) && gdk_text_measure(cfont, text, num) > maxwidth) || gdk_text_measure(cfont, text, num) < 0) { | 2898 if ((maxwidth == (hwidth - 8) && gdk_text_measure(cfont, text, num) > 2 * maxwidth) || |
2899 /* so here's how it works. we divide it in half. we look for the next whitespace char. | 2899 gdk_text_measure(cfont, text, num) < 0) { |
2900 * we print the first half up to the whitespace char, then the second half. if we | |
2901 * didn't find a whitespace char, we search backwards for one. if we still don't find | |
2902 * one, we just print the two halves; it would have wrapped anyway */ | |
2903 int pos = num / 2; | 2900 int pos = num / 2; |
2904 static int count = 0; | 2901 static int count = 0; |
2905 count ++; | 2902 count ++; |
2906 while (pos < num && (!isspace(text[pos]) || text[pos] == '\n')) pos++; | 2903 while (pos < num && (!isspace(text[pos]) || text[pos] == '\n')) pos++; |
2907 if (pos == num) { | 2904 if (pos == num) { |