# HG changeset patch # User Eric Warmenhoven # Date 981188380 0 # Node ID 1ac49082e099a230c311d87e4dbc9588ac3f9097 # Parent 9774a0a304c41afc2f286cc723fc5352d3568015 [gaim-migrate @ 1472] better line positioning committer: Tailor Script diff -r 9774a0a304c4 -r 1ac49082e099 src/gtkimhtml.c --- a/src/gtkimhtml.c Fri Feb 02 14:04:58 2001 +0000 +++ b/src/gtkimhtml.c Sat Feb 03 08:19:40 2001 +0000 @@ -1467,6 +1467,8 @@ imhtml->x = BORDER_SIZE; imhtml->y += imhtml->llheight; + imhtml->llheight = 0; + imhtml->llascent = 0; } static void @@ -1624,8 +1626,6 @@ pos = 0; seenspace = FALSE; new_line (imhtml); - imhtml->llheight = 0; - imhtml->llascent = 0; } backwards_update (imhtml, bit, height, bit->font->ascent); @@ -1650,6 +1650,7 @@ tmp = g_strndup (copy + pos, newpos); pos += newpos; + backwards_update (imhtml, bit, height, bit->font->ascent); add_text_renderer (imhtml, bit, tmp); seenspace = FALSE; @@ -1657,6 +1658,7 @@ } else { tmp = g_strdup (copy + pos); + backwards_update (imhtml, bit, height, bit->font->ascent); add_text_renderer (imhtml, bit, tmp); pos = strlen (bit->text); @@ -1670,26 +1672,19 @@ gdk_window_get_size (bit->pm, &width, &height); if ((imhtml->x != BORDER_SIZE) && - ((imhtml->x + width + BORDER_SIZE + BORDER_SIZE + 5) > imhtml->xsize)) { + ((imhtml->x + width + BORDER_SIZE + BORDER_SIZE + 5) > imhtml->xsize)) new_line (imhtml); - imhtml->llheight = 0; - imhtml->llascent = 0; - } else + else backwards_update (imhtml, bit, height, 0); add_img_renderer (imhtml, bit); } else if (bit->type == TYPE_BR) { new_line (imhtml); - imhtml->llheight = 0; - imhtml->llascent = 0; add_text_renderer (imhtml, bit, NULL); } else if (bit->type == TYPE_SEP) { struct line_info *li; - if (imhtml->llheight) { + if (imhtml->llheight) new_line (imhtml); - imhtml->llheight = 0; - imhtml->llascent = 0; - } li = g_new0 (struct line_info, 1); li->x = imhtml->x; @@ -1704,8 +1699,6 @@ imhtml->llheight = HR_HEIGHT * 2; new_line (imhtml); - imhtml->llheight = 0; - imhtml->llascent = 0; add_text_renderer (imhtml, bit, NULL); }