mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-20 04:44:30 -04:00
Rename {mightypork...DesktopApi=>i.b.util.DesktopUtil}
This commit is contained in:
parent
6495ccd5db
commit
d120dcad06
2 changed files with 6 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
||||||
package net.mightypork.rpack.utils;
|
package io.bitsquare.util;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
|
@ -10,12 +10,9 @@ import java.net.URI;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
// Taken form https://stackoverflow.com/questions/18004150/desktop-api-is-not-supported-on-the-current-platform,
|
||||||
import org.slf4j.LoggerFactory;
|
// originally net.mightypork.rpack.utils.DesktopApi
|
||||||
|
class DesktopUtil {
|
||||||
// Taken form https://stackoverflow.com/questions/18004150/desktop-api-is-not-supported-on-the-current-platform
|
|
||||||
public class DesktopApi {
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(DesktopApi.class);
|
|
||||||
|
|
||||||
public static boolean browse(URI uri) {
|
public static boolean browse(URI uri) {
|
||||||
|
|
|
@ -40,8 +40,6 @@ import javafx.scene.input.*;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import net.mightypork.rpack.utils.DesktopApi;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* General utilities
|
* General utilities
|
||||||
*/
|
*/
|
||||||
|
@ -89,7 +87,7 @@ public class Utilities {
|
||||||
else {
|
else {
|
||||||
// On Linux Desktop is poorly implemented.
|
// On Linux Desktop is poorly implemented.
|
||||||
// See https://stackoverflow.com/questions/18004150/desktop-api-is-not-supported-on-the-current-platform
|
// See https://stackoverflow.com/questions/18004150/desktop-api-is-not-supported-on-the-current-platform
|
||||||
if (!DesktopApi.browse(uri))
|
if (!DesktopUtil.browse(uri))
|
||||||
throw new IOException("Failed to open URI: " + uri.toString());
|
throw new IOException("Failed to open URI: " + uri.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue