From 861e7918f88ada8b1ad4cba0a5f41568442b0fac Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 8 Dec 2022 13:09:17 -0500 Subject: [PATCH] Add patch to avoid GFile for local files --- ...vince-Don-t-use-GFile-for-file-paths.patch | 35 +++++++++++++++++++ sushi.spec | 8 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-Evince-Don-t-use-GFile-for-file-paths.patch diff --git a/0001-Evince-Don-t-use-GFile-for-file-paths.patch b/0001-Evince-Don-t-use-GFile-for-file-paths.patch new file mode 100644 index 0000000..cabc08d --- /dev/null +++ b/0001-Evince-Don-t-use-GFile-for-file-paths.patch @@ -0,0 +1,35 @@ +From 3f50da04fe4f224f28c3146b3ecb512fef58449f Mon Sep 17 00:00:00 2001 +From: "FeRD (Frank Dana)" +Date: Thu, 8 Dec 2022 11:52:57 -0500 +Subject: [PATCH] Evince: Don't use GFile for file:/// paths. + +Signed-off-by: FeRD (Frank Dana) + +Evince: Use file.has_uri_scheme() +--- + src/viewers/evince.js | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/viewers/evince.js b/src/viewers/evince.js +index 4257870..79ad339 100644 +--- a/src/viewers/evince.js ++++ b/src/viewers/evince.js +@@ -79,7 +79,14 @@ var Klass = GObject.registerClass({ + } + + _loadFile(file) { +- let job = EvinceView.JobLoadGFile.new(file, EvinceDocument.DocumentLoadFlags.NONE); ++ let job; ++ if (file.has_uri_scheme("file")) { ++ job = EvinceView.JobLoad.new(file.get_uri()); ++ } else { ++ job = EvinceView.JobLoadGFile.new( ++ file, EvinceDocument.DocumentLoadFlags.NONE); ++ } ++ + job.connect('finished', this._onLoadJobFinished.bind(this)); + job.scheduler_push_job(EvinceView.JobPriority.PRIORITY_NONE); + } +-- +2.38.1 + diff --git a/sushi.spec b/sushi.spec index c4ff242..ca8d65c 100644 --- a/sushi.spec +++ b/sushi.spec @@ -4,13 +4,16 @@ Name: sushi Version: 43.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A quick previewer for Nautilus License: GPLv2+ with exceptions URL: https://gitlab.gnome.org/GNOME/sushi Source0: https://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz +# Submitted upstream: https://gitlab.gnome.org/GNOME/sushi/-/merge_requests/39 +Patch0: 0001-Evince-Don-t-use-GFile-for-file-paths.patch + BuildRequires: gettext BuildRequires: gjs-devel BuildRequires: meson @@ -56,6 +59,9 @@ file manager. %changelog +* Thu Dec 08 2022 FeRD (Frank Dana) - 43.0-2 +- Add patch to fix local previewing of some Evince types + * Tue Sep 20 2022 Kalev Lember - 43.0-1 - Update to 43.0