aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/http_loader.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2016-04-16 09:05:59 -0400
committerJosh Matthews <josh@joshmatthews.net>2016-04-16 15:00:31 -0400
commitd09a497aa5d0e167e69ae57f50d7933cad2b8a0c (patch)
treec0929588e434389c0da5e7d7a0050c824e8c31ac /components/net/http_loader.rs
parent7bd23815184bfa675bde040231199722c703d2f0 (diff)
downloadservo-d09a497aa5d0e167e69ae57f50d7933cad2b8a0c.tar.gz
servo-d09a497aa5d0e167e69ae57f50d7933cad2b8a0c.zip
Disable tinyfiledialogs on non-OS X and Linux platforms.
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;