diff options
author | Nickolay V. Shmyrev <nshmyrev@yandex.ru> | 2007-12-23 17:14:04 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2007-12-23 17:14:04 (GMT) |
commit | 14633f07b92d515ca0c4447506fa938b3568f013 (patch) | |
tree | 351925b2e057a8198f636ad8ee99d6143faba864 /shell/ev-window.c | |
parent | 5b3184cd2e213fc3ee7d3036003e55aaca64042e (diff) |
Autoscroll feature with the context menu. Fixes bug #323670. Thanks to
2007-12-23 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* 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 <cillian64@googlemail.com>.
svn path=/trunk/; revision=2781
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r-- | shell/ev-window.c | 10 |
1 files changed, 10 insertions, 0 deletions
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"), "<control>Page_Up", N_("Go to the previous page"), |