changeset 5282:2d7f9a092b81

[gaim-migrate @ 5654] Ka-Hing Cheung (bsponline) writes: " End result, pressing shift+pgup|pgdown works again." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 02 May 2003 03:18:13 +0000
parents eae93f3e46bd
children 1872e8efba87
files src/gtkimhtml.c
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Fri May 02 01:57:52 2003 +0000
+++ b/src/gtkimhtml.c	Fri May 02 03:18:13 2003 +0000
@@ -1368,9 +1368,25 @@
 
 void gtk_imhtml_page_up (GtkIMHtml *imhtml)
 {
+	GdkRectangle rect;
+	GtkTextIter iter;
 
+	gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(imhtml), &rect);
+	gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(imhtml), &iter, rect.x,
+									   rect.y - rect.height);
+	gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(imhtml), &iter, 0, TRUE, 0, 0);
+	
 }
-void       gtk_imhtml_page_down        (GtkIMHtml        *imhtml){}
+void gtk_imhtml_page_down (GtkIMHtml *imhtml)
+{
+	GdkRectangle rect;
+	GtkTextIter iter;
+
+	gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(imhtml), &rect);
+	gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(imhtml), &iter, rect.x,
+									   rect.y + rect.height);
+	gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(imhtml), &iter, 0, TRUE, 0, 0);
+}
 
 static gint
 gtk_imhtml_tip_paint (GtkIMHtml *imhtml)