Disabled tinyfiledialogs when running headless.

This commit is contained in:
Alan Jeffrey 2017-03-15 14:49:15 -05:00
parent e1841fbd36
commit f05577cb29
6 changed files with 21 additions and 2 deletions

View file

@ -379,7 +379,9 @@ impl Window {
#[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);
if !opts::get().headless {
tinyfiledialogs::message_box_ok("Alert!", message, MessageBoxIcon::Warning);
}
}
#[cfg(not(any(target_os = "macos", target_os = "linux", target_os = "windows")))]