aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backends/kdialog.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backends/kdialog.rs b/src/backends/kdialog.rs
index c2ddcd0..e556ddf 100644
--- a/src/backends/kdialog.rs
+++ b/src/backends/kdialog.rs
@@ -4,7 +4,7 @@
use std::process;
-use crate::{Choice, Error, Input, Message, Password, Question, Result};
+use crate::{Choice, Error, FileSelection, Input, Message, Password, Question, Result};
/// Subprocess exit codes
///
@@ -136,4 +136,11 @@ impl super::Backend for KDialog {
self.execute(args, &question.title)
.and_then(|output| get_choice(output.status))
}
+
+ fn show_file_selection(&self, file_selection: &FileSelection) -> Result<Option<String>> {
+ let dir = file_selection.path_to_string().ok_or("path not valid")?;
+ let args = vec!["--getopenfilename", &dir];
+ self.execute(args, &file_selection.title)
+ .and_then(get_stdout)
+ }
}