From: Nickolay V. Shmyrev Date: Sun, 5 Mar 2006 16:08:21 +0000 (+0000) Subject: Don't jump on scrolling, fix for the bug #333127. X-Git-Tag: EVINCE_0_5_2~23 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;ds=sidebyside;h=817734ffbf42540f8f2bf3175118364a806af70a;hp=ff64f5106b41a38729bf65fa41e82a1a8fd388df;p=evince.git Don't jump on scrolling, fix for the bug #333127. * shell/ev-view.c: (view_update_range_and_current_page), (page_changed_cb): Don't jump on scrolling, fix for the bug #333127. --- diff --git a/ChangeLog b/ChangeLog index 9b662dad..98b5dc52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-03-05 Nickolay V. Shmyrev + + * shell/ev-view.c: (view_update_range_and_current_page), + (page_changed_cb): + + Don't jump on scrolling, fix for the bug #333127. + 2006-03-01 Nickolay V. Shmyrev * shell/ev-view.c: (ev_view_next_page), (ev_view_previous_page): diff --git a/shell/ev-view.c b/shell/ev-view.c index 0f671c20..d8a80249 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -471,7 +471,7 @@ view_update_range_and_current_page (EvView *view) else view->end_page = view->start_page; } else { - if (view->current_page - 1 < 0) + if (view->current_page < 1) view->start_page = view->current_page; else view->start_page = view->current_page - 1; @@ -487,6 +487,7 @@ view_update_range_and_current_page (EvView *view) current_page = ev_page_cache_get_current_page (view->page_cache); if (current_page < view->start_page || current_page > view->end_page) { + view->current_page = view->start_page; ev_page_cache_set_current_page (view->page_cache, view->start_page); } @@ -2612,15 +2613,16 @@ page_changed_cb (EvPageCache *page_cache, EvView *view) { if (view->current_page != new_page) { - view->current_page = new_page; view->pending_scroll = SCROLL_TO_PAGE_POSITION; gtk_widget_queue_resize (GTK_WIDGET (view)); + } else { + gtk_widget_queue_draw (GTK_WIDGET (view)); + } - if (EV_IS_DOCUMENT_FIND (view->document)) { - view->find_result = 0; - update_find_status_message (view, TRUE); - } + if (EV_IS_DOCUMENT_FIND (view->document)) { + view->find_result = 0; + update_find_status_message (view, TRUE); } }