[evince/gnome-3-36] shell: Make Esc cancel any annotation in progress
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-3-36] shell: Make Esc cancel any annotation in progress
- Date: Sun, 24 Jan 2021 01:52:59 +0000 (UTC)
commit ab517d011352427b7ecc305d14a3de67a2598c73
Author: Casey Jao <casey jao gmail com>
Date: Sun Sep 27 10:16:34 2020 -0400
shell: Make Esc cancel any annotation in progress
Fixes #1416
shell/ev-window.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 8e9a86fd..bad76b44 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -389,6 +389,7 @@ static void recent_view_item_activated_cb (EvRecentView *recen
static void ev_window_fullscreen_show_toolbar (EvWindow *ev_window);
static void ev_window_begin_add_annot (EvWindow *ev_window,
EvAnnotationType annot_type);
+static void ev_window_cancel_add_annot (EvWindow *window);
static gchar *nautilus_sendto = NULL;
@@ -5192,8 +5193,13 @@ ev_window_cmd_escape (GSimpleAction *action,
ev_window_stop_fullscreen (window, TRUE);
else if (EV_WINDOW_IS_PRESENTATION (priv))
ev_window_stop_presentation (window, TRUE);
- else
+ else {
+ /* Cancel any annotation in progress and untoggle the
+ * toolbar button. */
+ ev_window_cancel_add_annot (window);
+ ev_annotations_toolbar_add_annot_finished (EV_ANNOTATIONS_TOOLBAR (priv->annots_toolbar));
gtk_widget_grab_focus (priv->view);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]