[evince/gnome-3-38] 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-38] shell: Make Esc cancel any annotation in progress
- Date: Sun, 24 Jan 2021 01:53:25 +0000 (UTC)
commit 581b1750612e133245ba0402d8c5343055205f83
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 c5a19110..70aed02f 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -403,6 +403,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;
@@ -5333,8 +5334,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]