From 055a1abe47b939ec7c4b093c1e61b801bb8b7f90 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Mar 16 2018 15:33:54 +0000 Subject: fix for rhbz (#1554134) --- diff --git a/atril.spec b/atril.spec index b9e23c3..c4f216e 100644 --- a/atril.spec +++ b/atril.spec @@ -15,7 +15,7 @@ Name: atril Version: %{branch}.0 %if 0%{?rel_build} -Release: 1%{?dist} +Release: 2%{?dist} %else Release: 0.7%{?git_rel}%{?dist} %endif @@ -29,6 +29,9 @@ URL: http://mate-desktop.org # Source for snapshot-builds. %{!?rel_build:Source0: http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}} +# https://github.com/mate-desktop/atril/commit/005d885 +Patch1: atril_0001-Check-legal-boundaries-of-accessible-pages.patch + BuildRequires: gtk3-devel BuildRequires: poppler-glib-devel BuildRequires: libXt-devel @@ -154,7 +157,6 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/atril.desktop %post libs -p /sbin/ldconfig - %postun libs -p /sbin/ldconfig @@ -201,6 +203,9 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/atril.desktop %changelog +* Fri Mar 16 2018 Wolfgang Ulbrich - 1.20.0-2 +- fix for rhbz (#1554134) + * Sun Feb 11 2018 Wolfgang Ulbrich - 1.20.0-1 - update to 1.20.0 release - drop desktop-database rpm scriptlet @@ -217,6 +222,8 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/atril.desktop * Sun Jan 07 2018 Igor Gnatenko - 1.19.6-2 - Remove obsolete scriptlets +======= +>>>>>>> ba3336a... fix for rhbz (#1554134) * Thu Jan 04 2018 Wolfgang Ulbrich - 1.19.6-1 - update to 1.19.6 - fixes https://bugzilla.redhat.com/show_bug.cgi?id=1525313 diff --git a/atril_0001-Check-legal-boundaries-of-accessible-pages.patch b/atril_0001-Check-legal-boundaries-of-accessible-pages.patch new file mode 100644 index 0000000..5deda46 --- /dev/null +++ b/atril_0001-Check-legal-boundaries-of-accessible-pages.patch @@ -0,0 +1,47 @@ +From 005d88500dc47f285d83fc5451cd5cea0e8c14a3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Germ=C3=A1n=20Poo-Caama=C3=B1o?= +Date: Thu, 18 Feb 2016 16:44:40 -0800 +Subject: [PATCH] Check legal boundaries of accessible pages + +Fixes https://github.com/mate-desktop/atril/issues/302 + +Keep the accessible view end page under the limits of the document. +Sometimes when a document is reloaded, it may have less pages making +the end page higher than the actual number of pages. + +Fix end_page reset after reload a page + +When a document is reloaded, and the accessible end_page is higher +than the number of pages, it must be re-initialized to the number +of pages minus one because it refers to elements in an array. + +Fix https://bugzilla.gnome.org/show_bug.cgi?id=735744 + +origin commits: +https://git.gnome.org/browse/evince/commit/?id=feff531 +https://git.gnome.org/browse/evince/commit/?id=e6e0d29 +--- + libview/ev-view-accessible.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libview/ev-view-accessible.c b/libview/ev-view-accessible.c +index d48c97c..8274ace 100644 +--- a/libview/ev-view-accessible.c ++++ b/libview/ev-view-accessible.c +@@ -380,6 +380,13 @@ initialize_children (EvViewAccessible *self) + child = ev_page_accessible_new (self, i); + g_ptr_array_add (self->priv->children, child); + } ++ /* When a document is reloaded, it may have less pages. ++ * We need to update the end page accordingly to avoid ++ * invalid access to self->priv->children ++ * See https://bugzilla.gnome.org/show_bug.cgi?id=735744 ++ */ ++ if (self->priv->end_page >= n_pages) ++ self->priv->end_page = n_pages - 1; + } + + static void +-- +2.13.6 +