[evince] window: Set page cache size with correct type
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] window: Set page cache size with correct type
- Date: Wed, 3 Mar 2021 16:47:40 +0000 (UTC)
commit cede6a27ff09450dfcd2db7c2eae4d5841917986
Author: Marek Kasik <mkasik redhat com>
Date: Wed Mar 3 17:15:58 2021 +0100
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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]