]> www.fi.muni.cz Git - evince.git/commitdiff
Correctly clamp adjustment value. Fix for the bug #325808.
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Thu, 5 Jan 2006 10:09:57 +0000 (10:09 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Thu, 5 Jan 2006 10:09:57 +0000 (10:09 +0000)
* shell/ev-view.c: (scroll_to_current_page):

Correctly clamp adjustment value. Fix for the bug
#325808.

ChangeLog
shell/ev-view.c

index dcb8db982f64f21b1c2996fe1154d86931a57977..d3bd74310d8764c9195be2c9a6ea0b05de46dc29 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-01-05  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * shell/ev-view.c: (scroll_to_current_page):
+       
+       Correctly clamp adjustment value. Fix for the bug
+       #325808.
+
 2006-01-04  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * shell/ev-sidebar-links.c: (print_section_cb):
index f0a371cd605c027d32a0aa376c08881c2d776bca..ebbd784872de17c1ea08ad36e83463622526289d 100644 (file)
@@ -333,7 +333,10 @@ scroll_to_current_page (EvView *view, GtkOrientation orientation)
                                                   view_point.y + view->vadjustment->page_size);
                } else {
                        gtk_adjustment_set_value (view->vadjustment,
-                                                 view_point.y);
+                                                 CLAMP (view_point.y,
+                                                 view->vadjustment->lower,
+                                                 view->vadjustment->upper -
+                                                 view->vadjustment->page_size));
                }
        } else {
                if (view->dual_page) {