import evince-3.28.4-7.el8

This commit is contained in:
CentOS Sources 2020-07-28 09:40:47 -04:00 committed by Stepan Oksanichenko
parent dbe776690f
commit 9e6c543684
4 changed files with 1551 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
From 9363553a3087c7dbfa93e1d342283600ceb5993b Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Fri, 22 Jun 2018 17:00:20 +0200
Subject: shell: Set application-id
Set "application-id" property for evince's GApplication
to "org.gnome.evince.Application".
An assertion warning is shown in shell if it is not set.
Even though we use G_APPLICATION_NON_UNIQUE, the application
ID is still required. See:
https://bugzilla.gnome.org/show_bug.cgi?id=646985#c2
Closes: https://gitlab.gnome.org/GNOME/evince/issues/918
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 7d546933..f173d7a4 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -65,6 +65,7 @@ struct _EvApplicationClass {
G_DEFINE_TYPE (EvApplication, ev_application, GTK_TYPE_APPLICATION)
#ifdef ENABLE_DBUS
+#define APPLICATION_DBUS_NAME "org.gnome.evince.Application"
#define APPLICATION_DBUS_OBJECT_PATH "/org/gnome/evince/Evince"
#define APPLICATION_DBUS_INTERFACE "org.gnome.evince.Application"
@@ -102,7 +103,7 @@ ev_application_new (void)
const GApplicationFlags flags = G_APPLICATION_NON_UNIQUE;
return g_object_new (EV_TYPE_APPLICATION,
- "application-id", NULL,
+ "application-id", APPLICATION_DBUS_NAME,
"flags", flags,
NULL);
}

View File

@ -0,0 +1,62 @@
From 9d6ebdb168f8438449c43e63f38f687e09c8fe4f Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
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

View File

@ -5,7 +5,7 @@
Name: evince
Version: 3.28.4
Release: 4%{?dist}
Release: 7%{?dist}
Summary: Document viewer
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
@ -22,6 +22,15 @@ Patch7: evince-3.28.2-covscan.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1716295
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
# https://bugzilla.redhat.com/show_bug.cgi?id=1842017
Patch11: evince-3.28.4-application-id.patch
BuildRequires: pkgconfig(adwaita-icon-theme)
BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gnome-desktop-3.0)
@ -250,6 +259,20 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/evince.desktop
%{_libdir}/mozilla/plugins/libevbrowserplugin.so
%changelog
* Fri Jun 5 2020 Marek Kasik <mkasik@redhat.com> - 3.28.4-7
- Set "application-id" property for evince's GApplication
- to "org.gnome.evince.Application" to avoid a critical warning.
- Resolves: #1842017
* Mon Apr 27 2020 Marek Kasik <mkasik@redhat.com> - 3.28.4-6
- Move annotation popup window to new position
- Resolves: #1450700
* Mon Apr 20 2020 Marek Kasik <mkasik@redhat.com> - 3.28.4-5
- Set a11y names for annotation buttons
- Backport their translations
- Resolves: #1719328
* Mon Nov 4 2019 Marek Kasik <mkasik@redhat.com> - 3.28.4-4
- Remove metainfo for plugins since they are not real addons
- Resolves: #1760363