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

shell: Add "s" key shortcut to add text annotation

https://bugzilla.gnome.org/show_bug.cgi?id=758329
Partial fix for #635.
parent 9c46a677
......@@ -1045,6 +1045,7 @@ ev_application_startup (GApplication *gapplication)
"win.rotate-right", "<Ctrl>Right", NULL,
"win.inverted-colors", "<Ctrl>I", NULL,
"win.reload", "<Ctrl>R", NULL,
"win.add-annotation", "s", NULL,
NULL
};
......
......@@ -388,6 +388,8 @@ static void recent_view_item_activated_cb (EvRecentView *recen
const char *uri,
EvWindow *ev_window);
static void ev_window_fullscreen_show_toolbar (EvWindow *ev_window);
static void ev_window_begin_add_annot (EvWindow *ev_window,
EvAnnotationType annot_type);
static gchar *nautilus_sendto = NULL;
......@@ -5604,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_annotation (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
EvWindow *ev_window = user_data;
ev_window_begin_add_annot (ev_window, EV_ANNOTATION_TYPE_TEXT);
}
static void
ev_window_cmd_toggle_edit_annots (GSimpleAction *action,
GVariant *state,
......@@ -5927,6 +5939,7 @@ static const GActionEntry actions[] = {
{ "escape", ev_window_cmd_escape },
{ "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 },
{ "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