[evince] libview: Open new annotation window only for text annotation



commit 42f46948932f5112e32d066bd99e051a59c25024
Author: Michaël B <michael berteaux live be>
Date:   Wed Aug 25 12:16:26 2021 +0000

    libview: Open new annotation window only for text annotation
    
    Commit https://gitlab.gnome.org/GNOME/evince/-/commit/722b38a2bc2c5a949ddfbd812df1096738ae9bdc introduce 
the automatic opening of new annotation window when a user highlight text.
    While it is convenient for reviewing articles, it is not for users who only want to highlight text or 
annotate in some other way.

 libview/ev-view.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 69c5904e..354b6ce6 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -6303,8 +6303,6 @@ ev_view_add_text_markup_annotation_for_selected_text (EvView  *view)
                        g_signal_emit (view, signals[SIGNAL_ANNOT_ADDED], 0, view->adding_annot_info.annot);
        }
 
-       ev_view_annotation_create_show_popup_window (view, view->adding_annot_info.annot);
-
        clear_selection (view);
 
        view->adding_annot_info.adding_annot = FALSE;
@@ -6440,11 +6438,12 @@ ev_view_button_release_event (GtkWidget      *widget,
                                                                                 
EV_ANNOTATIONS_SAVE_POPUP_RECT);
                                        ev_document_doc_mutex_unlock ();
                                }
-
-                               ev_view_annotation_create_show_popup_window (view, 
view->adding_annot_info.annot);
                        }
                }
 
+               if (view->adding_annot_info.type == EV_ANNOTATION_TYPE_TEXT)
+                       ev_view_annotation_create_show_popup_window (view, view->adding_annot_info.annot);
+                       
                view->adding_annot_info.stop.x = event->x + view->scroll_x;
                view->adding_annot_info.stop.y = event->y + view->scroll_y;
                if (annot_added)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]