From d691bf7c0176fbd9215dc204d381fb0579935cb1 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Fri, 24 Nov 2017 10:26:58 +0100 Subject: shell: show caret navigation in menu but set this action sensitive for epubs --- data/atril-ui.xml | 2 ++ shell/ev-window.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/data/atril-ui.xml b/data/atril-ui.xml index a2647426..33ccd263 100644 --- a/data/atril-ui.xml +++ b/data/atril-ui.xml @@ -45,6 +45,8 @@ + + diff --git a/shell/ev-window.c b/shell/ev-window.c index 21b67cee..a1675fcf 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -615,6 +615,10 @@ ev_window_update_actions (EvWindow *ev_window) has_pages && !presentation_mode && !EV_WEB_VIEW(ev_window->priv->webview)); + ev_window_set_action_sensitive (ev_window, "ViewCaretNavigation", + has_pages && + !presentation_mode && + !EV_WEB_VIEW(ev_window->priv->webview)); } #endif @@ -6438,6 +6442,9 @@ static const GtkToggleActionEntry toggle_entries[] = { { "ViewInvertedColors", EV_STOCK_INVERTED_COLORS, N_("_Inverted Colors"), "I", N_("Show page contents with the colors inverted"), G_CALLBACK (ev_window_cmd_view_inverted_colors) }, + { "ViewCaretNavigation", GTK_STOCK_INDEX, N_("Caret _Navigation"), "F7", + N_("Activate or disable caret-navigation"), + G_CALLBACK (ev_window_cmd_view_toggle_caret_navigation) }, }; -- cgit v1.2.1