From 7c5d2ecb4efd40c1a5f6b4e07b84a0c546be3452 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 14 2020 22:14:46 +0000 Subject: import evince-3.28.4-6.el8 --- diff --git a/SOURCES/evince-3.28.4-move-annotations.patch b/SOURCES/evince-3.28.4-move-annotations.patch new file mode 100644 index 0000000..226c392 --- /dev/null +++ b/SOURCES/evince-3.28.4-move-annotations.patch @@ -0,0 +1,62 @@ +From 9d6ebdb168f8438449c43e63f38f687e09c8fe4f Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: Thu, 5 Mar 2020 13:21:59 +0100 +Subject: [PATCH] ev-view: Move annotation popup window to new position + +Open annotation popup window at new position if its +annotation was moved when the popup window was hidden. +This places existing popup window the same way as when +it was created. +--- + libview/ev-view.c | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +diff --git a/libview/ev-view.c b/libview/ev-view.c +index ffbe1704..43a0410d 100644 +--- a/libview/ev-view.c ++++ b/libview/ev-view.c +@@ -3390,6 +3390,41 @@ ev_view_handle_annotation (EvView *view, + + parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))); + window = ev_view_create_annotation_window (view, annot, parent); ++ } else if (window && ev_annotation_markup_has_popup (EV_ANNOTATION_MARKUP (annot))) { ++ EvViewWindowChild *child; ++ EvMappingList *annots; ++ EvRectangle popup_rect; ++ EvMapping *mapping; ++ GdkPoint view_point; ++ EvPoint annotation_corner; ++ ++ child = ev_view_get_window_child (view, window); ++ annots = ev_page_cache_get_annot_mapping (view->page_cache, ++ ev_annotation_get_page_index (annot)); ++ mapping = ev_mapping_list_find (annots, annot); ++ ev_annotation_markup_get_rectangle (EV_ANNOTATION_MARKUP (annot), ++ &popup_rect); ++ ++ popup_rect.x2 = mapping->area.x2 + popup_rect.x2 - popup_rect.x1; ++ popup_rect.y2 = mapping->area.y2 + popup_rect.y2 - popup_rect.y1; ++ popup_rect.x1 = mapping->area.x2; ++ popup_rect.y1 = mapping->area.y2; ++ g_object_set (annot, ++ "rectangle", &popup_rect, ++ "popup_is_open", TRUE, ++ NULL); ++ ++ annotation_corner.x = mapping->area.x2; ++ annotation_corner.y = mapping->area.y2; ++ ++ _ev_view_transform_doc_point_to_view_point (view, ++ ev_annotation_get_page_index (annot), ++ &annotation_corner, ++ &view_point); ++ ++ ev_view_window_child_move (view, child, ++ child->parent_x + view_point.x - view->scroll_x, ++ child->parent_y + view_point.y - view->scroll_y); + } + ev_view_annotation_show_popup_window (view, window); + } +-- +2.24.1 + diff --git a/SPECS/evince.spec b/SPECS/evince.spec index df411d6..584dae7 100644 --- a/SPECS/evince.spec +++ b/SPECS/evince.spec @@ -5,7 +5,7 @@ Name: evince Version: 3.28.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Document viewer License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse @@ -25,6 +25,9 @@ Patch8: evince-3.28.2-TIFFReadRGBAImageOriented.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1719328 Patch9: evince-3.28.4-annotations-a11y-names.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1450700 +Patch10: evince-3.28.4-move-annotations.patch + BuildRequires: pkgconfig(adwaita-icon-theme) BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gnome-desktop-3.0) @@ -253,6 +256,10 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/evince.desktop %{_libdir}/mozilla/plugins/libevbrowserplugin.so %changelog +* Mon Apr 27 2020 Marek Kasik - 3.28.4-6 +- Move annotation popup window to new position +- Resolves: #1450700 + * Mon Apr 20 2020 Marek Kasik - 3.28.4-5 - Set a11y names for annotation buttons - Backport their translations