From: Nickolay V. Shmyrev Date: Sat, 18 Jun 2005 06:50:29 +0000 (+0000) Subject: Shift + PageUp moves 10 Pages. Fix for 306125 X-Git-Tag: EVINCE_0_3_3~234 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=0b77ab6efe83e32698b0f1390916c1a7d7738261;p=evince.git Shift + PageUp moves 10 Pages. Fix for 306125 * data/evince-ui.xml: * shell/ev-window.c: (ev_window_cmd_go_forward), (ev_window_cmd_go_backward): Shift + PageUp moves 10 Pages. Fix for 306125 --- diff --git a/ChangeLog b/ChangeLog index c07ae985..af75b5b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-06-18 Nickolay V. Shmyrev + + * data/evince-ui.xml: + * shell/ev-window.c: (ev_window_cmd_go_forward), + (ev_window_cmd_go_backward): + + Shift + PageUp moves 10 Pages. Fix for 306125 + 2005-06-17 Marco Pesenti Gritti * pdf/ev-poppler.cc: diff --git a/data/evince-ui.xml b/data/evince-ui.xml index be1cf0b6..1cb27cf4 100644 --- a/data/evince-ui.xml +++ b/data/evince-ui.xml @@ -80,4 +80,6 @@ + + diff --git a/shell/ev-window.c b/shell/ev-window.c index 579cf653..4e8db2f0 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1897,6 +1897,33 @@ ev_window_cmd_go_last_page (GtkAction *action, EvWindow *ev_window) ev_page_cache_set_current_page (ev_window->priv->page_cache, n_pages - 1); } +static void +ev_window_cmd_go_forward (GtkAction *action, EvWindow *ev_window) +{ + int n_pages, current_page; + + g_return_if_fail (EV_IS_WINDOW (ev_window)); + + n_pages = ev_page_cache_get_n_pages (ev_window->priv->page_cache); + current_page = ev_page_cache_get_current_page (ev_window->priv->page_cache); + + if (current_page + 10 < n_pages) + ev_page_cache_set_current_page (ev_window->priv->page_cache, current_page + 10); +} + +static void +ev_window_cmd_go_backward (GtkAction *action, EvWindow *ev_window) +{ + int current_page; + + g_return_if_fail (EV_IS_WINDOW (ev_window)); + + current_page = ev_page_cache_get_current_page (ev_window->priv->page_cache); + + if (current_page - 10 >= 0) + ev_page_cache_set_current_page (ev_window->priv->page_cache, current_page - 10); +} + static void ev_window_cmd_view_reload (GtkAction *action, EvWindow *ev_window) { @@ -2584,7 +2611,13 @@ static const GtkActionEntry entries[] = { G_CALLBACK (ev_window_cmd_view_zoom_out) }, { "FocusPageSelector", NULL, "", "l", N_("Focus the page selector"), - G_CALLBACK (ev_window_cmd_focus_page_selector) } + G_CALLBACK (ev_window_cmd_focus_page_selector) }, + { "GoBackwardFast", NULL, "", "Page_Up", + N_("Go ten pages backward"), + G_CALLBACK (ev_window_cmd_go_backward) }, + { "GoForwardFast", NULL, "", "Page_Down", + N_("Go ten pages forward"), + G_CALLBACK (ev_window_cmd_go_forward) }, }; /* Toggle items */