aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/filemanager_thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/filemanager_thread.rs')
-rw-r--r--components/net/filemanager_thread.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/net/filemanager_thread.rs b/components/net/filemanager_thread.rs
index 175d1ca3fe1..3b824759624 100644
--- a/components/net/filemanager_thread.rs
+++ b/components/net/filemanager_thread.rs
@@ -14,7 +14,7 @@ use std::ops::Index;
use std::path::{Path, PathBuf};
use std::sync::atomic::{self, AtomicUsize, AtomicBool, Ordering};
use std::sync::{Arc, RwLock};
-#[cfg(any(target_os = "macos", target_os = "linux"))]
+#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
use tinyfiledialogs;
use url::Url;
use util::prefs::PREFS;
@@ -37,7 +37,7 @@ pub trait UIProvider where Self: Sync {
pub struct TFDProvider;
impl UIProvider for TFDProvider {
- #[cfg(any(target_os = "macos", target_os = "linux"))]
+ #[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
fn open_file_dialog(&self, path: &str, patterns: Vec<FilterPattern>) -> Option<String> {
let mut filter = vec![];
for p in patterns {
@@ -52,7 +52,7 @@ impl UIProvider for TFDProvider {
tinyfiledialogs::open_file_dialog("Pick a file", path, filter_opt)
}
- #[cfg(any(target_os = "macos", target_os = "linux"))]
+ #[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
fn open_file_dialog_multi(&self, path: &str, patterns: Vec<FilterPattern>) -> Option<Vec<String>> {
let mut filter = vec![];
for p in patterns {
@@ -67,13 +67,13 @@ impl UIProvider for TFDProvider {
tinyfiledialogs::open_file_dialog_multi("Pick files", path, filter_opt)
}
- #[cfg(not(any(target_os = "macos", target_os = "linux")))]
- fn open_file_dialog(&self, path: &str, patterns: Vec<FilterPattern>) -> Option<String> {
+ #[cfg(not(any(target_os = "macos", target_os = "linux", target_os = "windows")))]
+ fn open_file_dialog(&self, _path: &str, _patterns: Vec<FilterPattern>) -> Option<String> {
None
}
- #[cfg(not(any(target_os = "macos", target_os = "linux")))]
- fn open_file_dialog_multi(&self, path: &str, patterns: Vec<FilterPattern>) -> Option<Vec<String>> {
+ #[cfg(not(any(target_os = "macos", target_os = "linux", target_os = "windows")))]
+ fn open_file_dialog_multi(&self, _path: &str, _patterns: Vec<FilterPattern>) -> Option<Vec<String>> {
None
}
}