]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-window.c
Autoscroll feature with the context menu. Fixes bug #323670. Thanks to
[evince.git] / shell / ev-window.c
index ca2a14ee8e8022e499ec084267992a9db85a5d70..bbf9d46953890c447518bb760560a4a97c4d1ec3 100644 (file)
@@ -393,6 +393,7 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window)
        ev_window_set_action_sensitive (ev_window, "ViewBestFit", has_pages);
        ev_window_set_action_sensitive (ev_window, "ViewPageWidth", has_pages);
        ev_window_set_action_sensitive (ev_window, "ViewReload", has_pages);
+       ev_window_set_action_sensitive (ev_window, "ViewAutoscroll", has_pages);
 
        /* Toolbar-specific actions: */
        ev_window_set_action_sensitive (ev_window, PAGE_SELECTOR_ACTION, has_pages);
@@ -3358,6 +3359,12 @@ ev_window_cmd_view_reload (GtkAction *action, EvWindow *ev_window)
        g_free (uri);
 }
 
+static void
+ev_window_cmd_view_autoscroll (GtkAction *action, EvWindow *ev_window)
+{
+       ev_view_autoscroll (EV_VIEW (ev_window->priv->view));
+}
+
 static void
 ev_window_cmd_help_contents (GtkAction *action, EvWindow *ev_window)
 {
@@ -4399,6 +4406,9 @@ static const GtkActionEntry entries[] = {
           N_("Reload the document"),
           G_CALLBACK (ev_window_cmd_view_reload) },
 
+       { "ViewAutoscroll", GTK_STOCK_MEDIA_PLAY, N_("Auto_scroll"), NULL, NULL,
+         G_CALLBACK (ev_window_cmd_view_autoscroll) },
+
         /* Go menu */
         { "GoPreviousPage", GTK_STOCK_GO_BACK, N_("_Previous Page"), "<control>Page_Up",
           N_("Go to the previous page"),