From 14633f07b92d515ca0c4447506fa938b3568f013 Mon Sep 17 00:00:00 2001 From: Nickolay V. Shmyrev Date: Sun, 23 Dec 2007 17:14:04 +0000 Subject: Autoscroll feature with the context menu. Fixes bug #323670. Thanks to 2007-12-23 Nickolay V. Shmyrev * data/evince-toolbar.xml: * data/evince-ui.xml: * shell/ev-view-private.h: * shell/ev-view.c: (ev_view_handle_cursor_over_xy), (ev_view_button_press_event), (ev_view_motion_notify_event), (ev_view_button_release_event), (ev_view_init), (ev_view_autoscroll_cb), (ev_view_autoscroll), (ev_view_set_cursor): * shell/ev-view.h: * shell/ev-window.c: (ev_window_setup_action_sensitivity), (ev_window_cmd_view_autoscroll): Autoscroll feature with the context menu. Fixes bug #323670. Thanks to David Turner . svn path=/trunk/; revision=2781 --- (limited to 'shell/ev-window.c') diff --git a/shell/ev-window.c b/shell/ev-window.c index ca2a14e..bbf9d46 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -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); @@ -3359,6 +3360,12 @@ ev_window_cmd_view_reload (GtkAction *action, EvWindow *ev_window) } 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) { GError *error = NULL; @@ -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"), "Page_Up", N_("Go to the previous page"), -- cgit v0.9.1