[evince/663-button-press-creates-annotation] annotations-toolbar: add text markup annotation from selection
- From: Nelson Benítez León <nbenitez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/663-button-press-creates-annotation] annotations-toolbar: add text markup annotation from selection
- Date: Sun, 29 Jul 2018 12:58:55 +0000 (UTC)
commit f9fbb84fe6bd1012d6db35e92e7f64ef8cf673bc
Author: Nelson Benítez León <nbenitezl gmail com>
Date: Tue May 1 18:26:36 2018 +0500
annotations-toolbar: add text markup annotation from selection
When there's a text selection, and user clicks the toolbutton
for "Add text markup annotation" then we will directly add a
text markup annotation from the selected text, as that is an
intuitive way to do it.
Part of issue #663
shell/ev-window.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 7d783f90..53688bcc 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -6047,6 +6047,12 @@ static void
ev_window_begin_add_annot (EvWindow *window,
EvAnnotationType annot_type)
{
+ if (annot_type == EV_ANNOTATION_TYPE_TEXT_MARKUP &&
+ ev_view_get_has_selection (EV_VIEW (window->priv->view))) {
+ ev_view_add_text_markup_annotation_for_selected_text (EV_VIEW (window->priv->view));
+ return;
+ }
+
ev_view_begin_add_annotation (EV_VIEW (window->priv->view), annot_type);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]