changeset 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
files src/gtkhtml.c
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkhtml.c	Thu Sep 07 05:23:39 2000 +0000
+++ b/src/gtkhtml.c	Thu Sep 07 05:50:07 2000 +0000
@@ -2895,11 +2895,8 @@
 	 * HTK_SCROLLED_WINDOW(GTK_WIDGET(layout)->parent)->vscrollbar->allocation.width) - 8; 
 	 */
 
-	if ((maxwidth == (hwidth - 8) && gdk_text_measure(cfont, text, num) > maxwidth) || gdk_text_measure(cfont, text, num) < 0) {
-		/* so here's how it works. we divide it in half. we look for the next whitespace char.
-		 * we print the first half up to the whitespace char, then the second half. if we
-		 * didn't find a whitespace char, we search backwards for one. if we still don't find
-		 * one, we just print the two halves; it would have wrapped anyway */
+	if ((maxwidth == (hwidth - 8) && gdk_text_measure(cfont, text, num) > 2 * maxwidth) ||
+	    gdk_text_measure(cfont, text, num) < 0) {
 		int pos = num / 2;
 		static int count = 0;
 		count ++;