From 0ee11d4049372bdb7992ba618f8b2d652c45904c Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Tue, 16 Sep 2025 15:16:47 +0200 Subject: [PATCH] Launch target file instead of openning the same file again Resolves: RHEL-94768 --- papers-47.0-launch-target-file.patch | 31 ++++++++++++++++++++++++++++ papers.spec | 3 +++ 2 files changed, 34 insertions(+) create mode 100644 papers-47.0-launch-target-file.patch diff --git a/papers-47.0-launch-target-file.patch b/papers-47.0-launch-target-file.patch new file mode 100644 index 0000000..6b9ec39 --- /dev/null +++ b/papers-47.0-launch-target-file.patch @@ -0,0 +1,31 @@ +From e3bb3547c6674ae354c062198ccf0f440f48e6ef Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: Fri, 30 May 2025 16:01:30 +0200 +Subject: [PATCH] shell: Launch target file + +Launch target file instead of openning the same file again when +launch action is triggered. +--- + shell/src/document_view/signals.rs | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/shell/src/document_view/signals.rs b/shell/src/document_view/signals.rs +index 8f184f5e4..0e4d1219d 100644 +--- a/shell/src/document_view/signals.rs ++++ b/shell/src/document_view/signals.rs +@@ -260,7 +260,11 @@ impl imp::PpsDocumentView { + // does, simply ignore it + let file = self.file().unwrap(); + if file.uri() != uri { +- application::spawn(Some(&file), action.dest().as_ref(), Some(self.mode.get())); ++ application::spawn( ++ Some(&gio::File::for_uri(&uri)), ++ action.dest().as_ref(), ++ Some(self.mode.get()), ++ ); + } + } + +-- +2.51.0 + diff --git a/papers.spec b/papers.spec index fa663d2..dd5dcec 100644 --- a/papers.spec +++ b/papers.spec @@ -52,6 +52,9 @@ Patch: papers-47.0-fast-navigation.patch # Fix help Patch: papers-47.0-help.patch +# Fix openning of linked files +Patch: papers-47.0-launch-target-file.patch + # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86}