Use `open` instead of `xdg-open` in macos
TODO: make this configurable instead.tables
parent
8563bccd1b
commit
4fdc90b31e
|
@ -2334,7 +2334,16 @@ impl Component for MailView {
|
||||||
)
|
)
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|s| s.as_str())
|
.map(|s| s.as_str())
|
||||||
.unwrap_or("xdg-open");
|
.unwrap_or(
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
{
|
||||||
|
"open"
|
||||||
|
},
|
||||||
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
{
|
||||||
|
"xdg-open"
|
||||||
|
},
|
||||||
|
);
|
||||||
match Command::new(url_launcher)
|
match Command::new(url_launcher)
|
||||||
.arg(url)
|
.arg(url)
|
||||||
.stdin(Stdio::piped())
|
.stdin(Stdio::piped())
|
||||||
|
@ -2622,7 +2631,16 @@ impl Component for MailView {
|
||||||
)
|
)
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|s| s.as_str())
|
.map(|s| s.as_str())
|
||||||
.unwrap_or("xdg-open");
|
.unwrap_or(
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
{
|
||||||
|
"open"
|
||||||
|
},
|
||||||
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
{
|
||||||
|
"xdg-open"
|
||||||
|
},
|
||||||
|
);
|
||||||
match Command::new(url_launcher)
|
match Command::new(url_launcher)
|
||||||
.arg(String::from_utf8_lossy(url).into_owned())
|
.arg(String::from_utf8_lossy(url).into_owned())
|
||||||
.stdin(Stdio::piped())
|
.stdin(Stdio::piped())
|
||||||
|
@ -2656,7 +2674,16 @@ impl Component for MailView {
|
||||||
)
|
)
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|s| s.as_str())
|
.map(|s| s.as_str())
|
||||||
.unwrap_or("xdg-open");
|
.unwrap_or(
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
{
|
||||||
|
"open"
|
||||||
|
},
|
||||||
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
{
|
||||||
|
"xdg-open"
|
||||||
|
},
|
||||||
|
);
|
||||||
match Command::new(url_launcher)
|
match Command::new(url_launcher)
|
||||||
.arg(actions.archive.unwrap())
|
.arg(actions.archive.unwrap())
|
||||||
.stdin(Stdio::piped())
|
.stdin(Stdio::piped())
|
||||||
|
|
|
@ -498,7 +498,16 @@ impl Component for EnvelopeView {
|
||||||
.url_launcher
|
.url_launcher
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|s| s.as_str())
|
.map(|s| s.as_str())
|
||||||
.unwrap_or("xdg-open");
|
.unwrap_or(
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
{
|
||||||
|
"open"
|
||||||
|
},
|
||||||
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
{
|
||||||
|
"xdg-open"
|
||||||
|
},
|
||||||
|
);
|
||||||
match Command::new(url_launcher)
|
match Command::new(url_launcher)
|
||||||
.arg(url)
|
.arg(url)
|
||||||
.stdin(Stdio::piped())
|
.stdin(Stdio::piped())
|
||||||
|
|
Loading…
Reference in New Issue