Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/evince.git#0999f65685715b9a8b7f52b955c4682a99607f46
This commit is contained in:
DistroBaker 2021-03-11 19:59:49 +00:00
parent b176be4598
commit 2f19f96e78
2 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,39 @@
From e56653558be1cb8ab2411437bd411f5c1812d0aa Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Wed, 3 Mar 2021 17:15:58 +0100
Subject: [PATCH] window: Set page cache size with correct type
ev_view_set_page_cache_size() accepts gsize as its second parameter
but guint was passed in. This reduced maximal cache size considerably
as its size is 4 bytes.
Retyping the multiplication by "1024 * 1024" to gsize increases maximal
configurable cache size beyond 4 GiB.
---
shell/ev-window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/shell/ev-window.c b/shell/ev-window.c
index ba282e18..077d577d 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -1554,7 +1554,7 @@ page_cache_size_changed (GSettings *settings,
page_cache_mb = g_settings_get_uint (settings, GS_PAGE_CACHE_SIZE);
ev_view_set_page_cache_size (EV_VIEW (priv->view),
- page_cache_mb * 1024 * 1024);
+ (gsize) page_cache_mb * 1024 * 1024);
}
static void
@@ -7636,7 +7636,7 @@ ev_window_init (EvWindow *ev_window)
page_cache_mb = g_settings_get_uint (ev_window_ensure_settings (ev_window),
GS_PAGE_CACHE_SIZE);
ev_view_set_page_cache_size (EV_VIEW (priv->view),
- page_cache_mb * 1024 * 1024);
+ (gsize) page_cache_mb * 1024 * 1024);
allow_links_change_zoom = g_settings_get_boolean (ev_window_ensure_settings (ev_window),
GS_ALLOW_LINKS_CHANGE_ZOOM);
ev_view_set_allow_links_change_zoom (EV_VIEW (priv->view),
--
2.30.1

View File

@ -6,13 +6,15 @@
Name: evince
Version: 3.39.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Document viewer
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
URL: https://wiki.gnome.org/Apps/Evince
Source0: https://download.gnome.org/sources/%{name}/3.39/%{name}-%{version}.tar.xz
Patch0: 0001-window-Set-page-cache-size-with-correct-type.patch
BuildRequires: gcc-c++
BuildRequires: gcc
BuildRequires: gettext-devel
@ -256,6 +258,10 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p
%{_mandir}/man1/evince-thumbnailer.1*
%changelog
* Wed Mar 03 2021 Marek Kasik <mkasik@redhat.com> - 3.39.2-2
- Set page cache size with correct type
- Resolves: #1458845
* Wed Feb 17 2021 Kalev Lember <klember@redhat.com> - 3.39.2-1
- Update to 3.39.2