changeset 1119:ba292594e938

[gaim-migrate @ 1129] scroll more intelligently committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 22 Nov 2000 02:03:14 +0000
parents e1078ee286ba
children 124e9f0b9af5
files src/gtkhtml.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkhtml.c	Tue Nov 21 10:13:39 2000 +0000
+++ b/src/gtkhtml.c	Wed Nov 22 02:03:14 2000 +0000
@@ -3210,6 +3210,10 @@
 	static struct font_state *current = NULL,
 	 *tmp;
 	static struct font_state def_state = { 3, 0, 0, "", NULL, NULL, NULL };
+	gboolean scrolldown = TRUE;
+
+	if (html->vadj->upper > (html->vadj->value + html->vadj->page_size))
+		scrolldown = FALSE;
 
 	if (text == NULL) {
 		bold = 0;
@@ -3699,7 +3703,8 @@
 
 	gdk_window_get_size(html->html_area, NULL, &height);
 	area.height = height;
-	gtk_adjustment_set_value(html->vadj, html->vadj->upper - area.height);
+	if (scrolldown)
+		gtk_adjustment_set_value(html->vadj, html->vadj->upper - area.height);
 
 	return;
 }