aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/http_loader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/http_loader.rs')
-rw-r--r--components/net/http_loader.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs
index 6578a83b8c2..25ff130dc26 100644
--- a/components/net/http_loader.rs
+++ b/components/net/http_loader.rs
@@ -41,6 +41,7 @@ use std::sync::mpsc::Sender;
use std::sync::{Arc, RwLock};
use time;
use time::Tm;
+#[cfg(any(target_os = "macos", target_os = "linux"))]
use tinyfiledialogs;
use url::Url;
use util::resource_files::resources_dir_path;
@@ -702,10 +703,16 @@ pub trait UIProvider {
}
impl UIProvider for TFDProvider {
+ #[cfg(any(target_os = "macos", target_os = "linux"))]
fn input_username_and_password(&self) -> (Option<String>, Option<String>) {
(tinyfiledialogs::input_box("Enter username", "Username:", ""),
tinyfiledialogs::input_box("Enter password", "Password:", ""))
}
+
+ #[cfg(not(any(target_os = "macos", target_os = "linux")))]
+ fn input_username_and_password(&self) -> (Option<String>, Option<String>) {
+ (None, None)
+ }
}
struct TFDProvider;