[evince] 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] shell: Make Esc cancel any annotation in progress
- Date: Sun, 24 Jan 2021 01:38:25 +0000 (UTC)
commit 7dbf24441db62d71be5e1ad5af2fcdb0d1d2fb11
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 beebef9c..14efd85b 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -411,6 +411,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;
@@ -5346,8 +5347,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]