window: Always ask for program to open images

This fixes "Open With…" not always asking for a program.
This commit is contained in:
Sophie Herold 2023-08-15 17:18:57 +02:00
parent 65a5f39861
commit 05868d785f
2 changed files with 2 additions and 1 deletions

View file

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

View file

@ -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);