ports/math/scilab/files/patch-xdg-open
Max Brazhnikov 436139c7b3 math/scilab:
- Update to 6.1.0. Requires decent c++ compiler and iconv from ports.
- Clean up patch target: remove no longer needed patches and those ones which
  don't affect build - at least for me.
- Remove MAKE_JOBS_UNSAFE. It was added in svn r417126 arguing that many
  ocaml-dependent ports are not jobs safe, but there were no logs to analyse.
  The plist change in that commit is unrelated to jobs safety.
2020-05-31 13:11:27 +00:00

28 lines
1.8 KiB
Text

--- modules/gui/src/java/org/scilab/modules/gui/utils/WebBrowser.java.orig 2020-02-25 09:59:55 UTC
+++ modules/gui/src/java/org/scilab/modules/gui/utils/WebBrowser.java
@@ -101,14 +101,14 @@ public final class WebBrowser implements XConfiguratio
// We have <pierre.marechal@scilab.org>
String mail = "mailto:" + url.substring(1, url.length() - 1);
if (webprefs.defaultMailer) {
- Desktop.getDesktop().mail(new URI(mail));
+ Runtime.getRuntime().exec("xdg-email " + new URI(mail).toString());
} else {
Runtime.getRuntime().exec(webprefs.cmdMailer + " " + new URI(mail).toString());
}
}
} else if (protocol.equals("mailto")) {
if (webprefs.defaultMailer) {
- Desktop.getDesktop().mail(new URI(url));
+ Runtime.getRuntime().exec("xdg-open " + new URI(url).toString());
} else {
Runtime.getRuntime().exec(webprefs.cmdMailer + " " + new URI(url).toString());
}
@@ -116,7 +116,7 @@ public final class WebBrowser implements XConfiguratio
if (webprefs.defaultBrowser) {
// Under Windows, ShellExecute is called with the URI and under Linux it is gnome_url_show.
// So to handle different protocol in URI, user must config its OS to handle them.
- Desktop.getDesktop().browse(new URI(url));
+ Runtime.getRuntime().exec("xdg-open " + new URI(url).toString());
} else {
Runtime.getRuntime().exec(webprefs.cmdBrowser + " " + new URI(url).toString());
}