Launch target file instead of openning the same file again

Resolves: RHEL-94768
This commit is contained in:
Marek Kasik 2025-09-16 15:16:47 +02:00
parent ec294ccf97
commit 0ee11d4049
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From e3bb3547c6674ae354c062198ccf0f440f48e6ef Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
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

View File

@ -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}