From: Carlos Garcia Campos Date: Mon, 25 Dec 2006 12:17:45 +0000 (+0000) Subject: Update page-cache when page is changed by the view, so that page-changed X-Git-Tag: EVINCE_0_7_1~41 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=eb72fc5f1b6ca2b156516fda0f75c6e0ad367045;p=evince.git Update page-cache when page is changed by the view, so that page-changed 2006-12-25 Carlos Garcia Campos * shell/ev-view.c: (goto_dest): Update page-cache when page is changed by the view, so that page-changed signal is emitted. --- diff --git a/ChangeLog b/ChangeLog index 4fda9838..6d49c40e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-12-25 Carlos Garcia Campos + + * shell/ev-view.c: (goto_dest): + + Update page-cache when page is changed by the view, so that + page-changed signal is emitted. + 2006-12-25 Carlos Garcia Campos * test/test1.py: diff --git a/shell/ev-view.c b/shell/ev-view.c index 8d65fb49..ad7ef61d 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -1254,13 +1254,15 @@ static void goto_dest (EvView *view, EvLinkDest *dest) { EvLinkDestType type; - int page, n_pages; + int page, n_pages, current_page; page = ev_link_dest_get_page (dest); n_pages = ev_page_cache_get_n_pages (view->page_cache); if (page < 0 || page >= n_pages) return; + + current_page = view->current_page; type = ev_link_dest_get_dest_type (dest); @@ -1289,6 +1291,10 @@ goto_dest (EvView *view, EvLinkDest *dest) default: g_assert_not_reached (); } + + if (current_page != view->current_page) + ev_page_cache_set_current_page (view->page_cache, + view->current_page); } void