From: Nickolay V. Shmyrev Date: Thu, 5 Jan 2006 10:09:57 +0000 (+0000) Subject: Correctly clamp adjustment value. Fix for the bug #325808. X-Git-Tag: EVINCE_0_5_0~18 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=c947601041a06d85b887f60899c092ea5a02d693;p=evince.git Correctly clamp adjustment value. Fix for the bug #325808. * shell/ev-view.c: (scroll_to_current_page): Correctly clamp adjustment value. Fix for the bug #325808. --- diff --git a/ChangeLog b/ChangeLog index dcb8db98..d3bd7431 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-01-05 Nickolay V. Shmyrev + + * shell/ev-view.c: (scroll_to_current_page): + + Correctly clamp adjustment value. Fix for the bug + #325808. + 2006-01-04 Nickolay V. Shmyrev * shell/ev-sidebar-links.c: (print_section_cb): diff --git a/shell/ev-view.c b/shell/ev-view.c index f0a371cd..ebbd7848 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -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) {