From 05868d785fe92616ce9633f92e295f3b07964674 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Tue, 15 Aug 2023 17:18:57 +0200 Subject: [PATCH] window: Always ask for program to open images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes "Open With…" not always asking for a program. --- Cargo.toml | 2 +- src/window.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 47c3964..4c9bcb1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ features = ["gtk4"] [dependencies.gtk] package = "gtk4" version = "0.7.1" -features = ["v4_10", "xml_validation"] +features = ["v4_12", "xml_validation"] [dependencies.gio] package = "gio" diff --git a/src/window.rs b/src/window.rs index 70af229..f7f1ba8 100644 --- a/src/window.rs +++ b/src/window.rs @@ -518,6 +518,7 @@ impl LpWindow { if let Some(ref file) = imp.image_view.current_file() { let launcher = gtk::FileLauncher::new(Some(file)); + launcher.set_always_ask(true); if let Err(e) = launcher.launch_future(Some(self)).await { if !e.matches(gtk::DialogError::Dismissed) { log::error!("Could not open image in external program: {}", e);