mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
Java's getDesktop() crashes if GTK3 is already loaded by SWT (apparently, it tries to load GTK2) - use SWT own API instead that works in both cases
This commit is contained in:
parent
73100ce64c
commit
e2da192845
1
TODO.md
1
TODO.md
@ -1,6 +1,5 @@
|
||||
HiDPI:
|
||||
* New flat and retina-compatible icons :-)
|
||||
* GTK3 crashes URL opening with Desktop.getDesktop()
|
||||
* GTK3 startup is slow
|
||||
* GTK3 progress bar - can it be centered?
|
||||
* Fewer problems when starting with SWT_GTK3=0
|
||||
|
||||
@ -6,9 +6,7 @@
|
||||
package net.azib.ipscan.gui.actions;
|
||||
|
||||
import net.azib.ipscan.core.UserErrorException;
|
||||
|
||||
import java.awt.*;
|
||||
import java.net.URI;
|
||||
import org.eclipse.swt.program.Program;
|
||||
|
||||
/**
|
||||
* The cross-platform browser launcher
|
||||
@ -23,7 +21,7 @@ public class BrowserLauncher {
|
||||
*/
|
||||
public static void openURL(String url) {
|
||||
try {
|
||||
Desktop.getDesktop().browse(new URI(url));
|
||||
Program.launch(url);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new UserErrorException("openURL.failed", url);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user