Commit d203432a authored by Felipe Borges's avatar Felipe Borges 👣 Committed by Germán Poo-Caamaño

shell: Add <Ctrl>H shortcut to add highlight annotations

https://bugzilla.gnome.org/show_bug.cgi?id=758329
Fixes #635
parent 138d2cb8
Pipeline #24206 passed with stage
in 14 minutes and 29 seconds
......@@ -1046,6 +1046,7 @@ ev_application_startup (GApplication *gapplication)
"win.inverted-colors", "<Ctrl>I", NULL,
"win.reload", "<Ctrl>R", NULL,
"win.add-annotation", "s", NULL,
"win.highlight-annotation", "<Ctrl>H", NULL,
NULL
};
......
......@@ -5606,6 +5606,16 @@ ev_window_cmd_view_toggle_caret_navigation (GSimpleAction *action,
ev_window_set_message_area (window, message_area);
}
static void
ev_window_cmd_add_highlight_annotation (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
EvWindow *ev_window = user_data;
ev_window_begin_add_annot (ev_window, EV_ANNOTATION_TYPE_TEXT_MARKUP);
}
static void
ev_window_cmd_add_annotation (GSimpleAction *action,
GVariant *state,
......@@ -5940,6 +5950,7 @@ static const GActionEntry actions[] = {
{ "open-menu", ev_window_cmd_action_menu },
{ "caret-navigation", NULL, NULL, "false", ev_window_cmd_view_toggle_caret_navigation },
{ "add-annotation", NULL, NULL, "false", ev_window_cmd_add_annotation },
{ "highlight-annotation", NULL, NULL, "false", ev_window_cmd_add_highlight_annotation },
{ "toggle-edit-annots", NULL, NULL, "false", ev_window_cmd_toggle_edit_annots },
/* Popups specific items */
{ "annotate-selected-text", ev_window_popup_cmd_annotate_selected_text },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment