]> www.fi.muni.cz Git - evince.git/commitdiff
Shift + PageUp moves 10 Pages. Fix for 306125
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sat, 18 Jun 2005 06:50:29 +0000 (06:50 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sat, 18 Jun 2005 06:50:29 +0000 (06:50 +0000)
* 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

ChangeLog
data/evince-ui.xml
shell/ev-window.c

index c07ae985f3c276082ed0ea8a3b57dd1627920846..af75b5b252a84bc70d808d0f8f368d8dd90463c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-06-18  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * 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  <mpg@redhat.com>
 
        * pdf/ev-poppler.cc:
index be1cf0b6c2cc3878ebff5458a9d56a5d04b4dfac..1cb27cf426ed203a4879439f2112104f4744c797 100644 (file)
@@ -80,4 +80,6 @@
   <accelerator name="PlusAccel" action="Plus"/>
   <accelerator name="MinusAccel" action="Minus"/>
   <accelerator name="CtrlEqualAccel" action="CtrlEqual"/>
+  <accelerator name="GoBackwardFastAccel" action="GoBackwardFast"/>
+  <accelerator name="GoForwardFastAccel" action="GoForwardFast"/>
 </ui>
index 579cf6533a910afb09a4284629d3ae5131105b92..4e8db2f0e8deeb849fcea143767b6c49a281e78e 100644 (file)
@@ -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, "", "<control>l",
           N_("Focus the page selector"),
-          G_CALLBACK (ev_window_cmd_focus_page_selector) }
+          G_CALLBACK (ev_window_cmd_focus_page_selector) },
+        { "GoBackwardFast", NULL, "", "<shift>Page_Up",
+          N_("Go ten pages backward"),
+          G_CALLBACK (ev_window_cmd_go_backward) },
+        { "GoForwardFast", NULL, "", "<shift>Page_Down",
+          N_("Go ten pages forward"),
+          G_CALLBACK (ev_window_cmd_go_forward) },
 };
 
 /* Toggle items */