From 31ad19f0812212412b01cc933c9c1806245735ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Poo-Caama=C3=B1o?= Date: Thu, 22 Jul 2021 13:47:23 -0400 Subject: [PATCH] shell: Enable annotation actions only in document that supports them Fixes #1638 --- shell/ev-window.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/ev-window.c b/shell/ev-window.c index fab121ca..0043074a 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -532,6 +532,10 @@ ev_window_update_actions_sensitivity (EvWindow *ev_window) !recent_view_mode); ev_window_set_action_enabled (ev_window, "toggle-find", can_find && !recent_view_mode); + ev_window_set_action_enabled (ev_window, "add-annotation", can_annotate && + !recent_view_mode); + ev_window_set_action_enabled (ev_window, "highlight-annotation", can_annotate && + !recent_view_mode); ev_window_set_action_enabled (ev_window, "toggle-edit-annots", can_annotate && !recent_view_mode); ev_window_set_action_enabled (ev_window, "rotate-left", has_pages && -- 2.34.1