# HG changeset patch # User Luke Schierer # Date 1046137716 0 # Node ID c05e6ecdc902e9b65d3f04487427f2723f2a9b65 # Parent e42d9186a8a0bc72db2bd20a3958ba0ac71f8660 [gaim-migrate @ 4901] Ka-Hing Cheung (bsponline) wrote a patch allowing you to scroll up w/out gaim automatically scrolling you back down. it causes some annoyance with multiple tabs and the history plugin, but its an improvement over the current situation. committer: Tailor Script diff -r e42d9186a8a0 -r c05e6ecdc902 src/gtkimhtml.c --- a/src/gtkimhtml.c Tue Feb 25 01:16:51 2003 +0000 +++ b/src/gtkimhtml.c Tue Feb 25 01:48:36 2003 +0000 @@ -764,6 +764,9 @@ GSList *fonts = NULL; + GdkRectangle rect; + int y, height; + g_return_val_if_fail (imhtml != NULL, NULL); g_return_val_if_fail (GTK_IS_IMHTML (imhtml), NULL); g_return_val_if_fail (text != NULL, NULL); @@ -780,6 +783,15 @@ gtk_text_buffer_get_end_iter(imhtml->text_buffer, &iter); mark = gtk_text_buffer_create_mark (imhtml->text_buffer, NULL, &iter, /* right grav */ FALSE); + + gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(imhtml), &rect); + gtk_text_view_get_line_yrange(GTK_TEXT_VIEW(imhtml), &iter, &y, &height); + + if(((y + height) - (rect.y + rect.height)) > height + && gtk_text_buffer_get_char_count(imhtml->text_buffer)){ + options |= GTK_IMHTML_NO_SCROLL; + } + while (pos < len) { if (*c == '<' && gtk_imhtml_is_tag (c + 1, &tag, &tlen, &type)) { c++;