aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/net/Cargo.toml2
-rw-r--r--components/net/filemanager_thread.rs14
-rw-r--r--components/net/http_loader.rs6
-rw-r--r--components/net/lib.rs2
-rw-r--r--components/script/Cargo.toml2
-rw-r--r--components/script/dom/window.rs8
-rw-r--r--components/script/lib.rs3
-rw-r--r--components/servo/Cargo.lock3
-rw-r--r--ports/cef/Cargo.lock3
9 files changed, 22 insertions, 21 deletions
diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml
index 9cb6ecfc5de..50b160130c2 100644
--- a/components/net/Cargo.toml
+++ b/components/net/Cargo.toml
@@ -46,5 +46,5 @@ git = "https://github.com/servo/webrender_traits"
default_features = false
features = ["serde_macros"]
-[target.'cfg(any(target_os = "macos", target_os = "linux"))'.dependencies]
+[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
tinyfiledialogs = {git = "https://github.com/jdm/tinyfiledialogs"}
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
}
}
diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs
index a39d284a486..a144721ff27 100644
--- a/components/net/http_loader.rs
+++ b/components/net/http_loader.rs
@@ -48,7 +48,7 @@ use std::sync::mpsc::Sender;
use std::sync::{Arc, RwLock};
use time;
use time::Tm;
-#[cfg(any(target_os = "macos", target_os = "linux"))]
+#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
use tinyfiledialogs;
use url::{Url, Position};
use util::prefs::PREFS;
@@ -843,13 +843,13 @@ pub trait UIProvider {
}
impl UIProvider for TFDProvider {
- #[cfg(any(target_os = "macos", target_os = "linux"))]
+ #[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
fn input_username_and_password(&self, prompt: &str) -> (Option<String>, Option<String>) {
(tinyfiledialogs::input_box(prompt, "Username:", ""),
tinyfiledialogs::input_box(prompt, "Password:", ""))
}
- #[cfg(not(any(target_os = "macos", target_os = "linux")))]
+ #[cfg(not(any(target_os = "macos", target_os = "linux", target_os = "windows")))]
fn input_username_and_password(&self, _prompt: &str) -> (Option<String>, Option<String>) {
(None, None)
}
diff --git a/components/net/lib.rs b/components/net/lib.rs
index 80c6294c277..53efb84f6c2 100644
--- a/components/net/lib.rs
+++ b/components/net/lib.rs
@@ -38,7 +38,7 @@ extern crate rand;
extern crate rustc_serialize;
extern crate threadpool;
extern crate time;
-#[cfg(any(target_os = "macos", target_os = "linux"))]
+#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
extern crate tinyfiledialogs;
extern crate unicase;
extern crate url;
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index 0640fb17f60..89525b535ee 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -14,7 +14,7 @@ path = "lib.rs"
[features]
debugmozjs = ['js/debugmozjs']
-[target.'cfg(any(target_os = "macos", target_os = "linux"))'.dependencies]
+[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
tinyfiledialogs = {git = "https://github.com/jdm/tinyfiledialogs"}
[dependencies]
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 2237514bd3d..f28f823dab4 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -95,7 +95,7 @@ use task_source::networking::NetworkingTaskSource;
use task_source::user_interaction::UserInteractionTaskSource;
use time;
use timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle, OneshotTimers, TimerCallback};
-#[cfg(any(target_os = "macos", target_os = "linux"))]
+#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
use tinyfiledialogs::{self, MessageBoxIcon};
use url::Url;
use util::geometry::{self, MAX_RECT};
@@ -361,14 +361,14 @@ impl Window {
}
}
-#[cfg(any(target_os = "macos", target_os = "linux"))]
+#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
fn display_alert_dialog(message: &str) {
tinyfiledialogs::message_box_ok("Alert!", message, MessageBoxIcon::Warning);
}
-#[cfg(not(any(target_os = "macos", target_os = "linux")))]
+#[cfg(not(any(target_os = "macos", target_os = "linux", target_os = "windows")))]
fn display_alert_dialog(_message: &str) {
- // tinyfiledialogs not supported on Windows
+ // tinyfiledialogs not supported on Android
}
// https://html.spec.whatwg.org/multipage/#atob
diff --git a/components/script/lib.rs b/components/script/lib.rs
index 78a84f83586..5b16377fe68 100644
--- a/components/script/lib.rs
+++ b/components/script/lib.rs
@@ -82,7 +82,7 @@ extern crate smallvec;
#[macro_use]
extern crate style;
extern crate time;
-#[cfg(any(target_os = "macos", target_os = "linux"))]
+#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
extern crate tinyfiledialogs;
extern crate url;
#[macro_use]
@@ -186,4 +186,3 @@ pub fn init(sw_senders: SWManagerSenders) {
pub unsafe fn script_can_initiate_scroll(_: *mut JSContext, _: Handle<*mut JSObject>) -> bool {
!opts::get().use_webrender
}
-
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock
index b881a7c3ac4..cd3704c6028 100644
--- a/components/servo/Cargo.lock
+++ b/components/servo/Cargo.lock
@@ -2316,8 +2316,9 @@ dependencies = [
[[package]]
name = "tinyfiledialogs"
version = "0.1.0"
-source = "git+https://github.com/jdm/tinyfiledialogs#3a30f8f95686195cb3bcecfc77ff77277a624a53"
+source = "git+https://github.com/jdm/tinyfiledialogs#54f6aa4f579edbc726b8a764fd759a6d6ed0dd84"
dependencies = [
+ "gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
]
diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock
index 61cbc98c96e..c5dedb8cd3a 100644
--- a/ports/cef/Cargo.lock
+++ b/ports/cef/Cargo.lock
@@ -2185,8 +2185,9 @@ dependencies = [
[[package]]
name = "tinyfiledialogs"
version = "0.1.0"
-source = "git+https://github.com/jdm/tinyfiledialogs#3a30f8f95686195cb3bcecfc77ff77277a624a53"
+source = "git+https://github.com/jdm/tinyfiledialogs#54f6aa4f579edbc726b8a764fd759a6d6ed0dd84"
dependencies = [
+ "gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
]