mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 07:15:54 -04:00
Use Utilities.openURL instead of Desktop.getDesktop().browse
This commit is contained in:
parent
57faf40759
commit
59db93dbdc
@ -20,17 +20,10 @@ package io.bitsquare.gui.components;
|
||||
import io.bitsquare.btc.WalletService;
|
||||
import io.bitsquare.btc.listeners.TxConfidenceListener;
|
||||
import io.bitsquare.gui.components.confidence.ConfidenceProgressIndicator;
|
||||
import io.bitsquare.util.Utilities;
|
||||
|
||||
import org.bitcoinj.core.TransactionConfidence;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.input.*;
|
||||
import javafx.scene.layout.*;
|
||||
@ -90,8 +83,8 @@ public class TxIdTextField extends AnchorPane {
|
||||
textField.setOnMouseClicked(mouseEvent -> {
|
||||
try {
|
||||
// TODO get the url form the app preferences
|
||||
Desktop.getDesktop().browse(URI.create("https://blockchain.info/tx/" + txID));
|
||||
} catch (IOException e) {
|
||||
Utilities.openURL("https://blockchain.info/tx/" + txID);
|
||||
} catch (Exception e) {
|
||||
log.warn(e.getMessage());
|
||||
Popups.openWarningPopup("Warning", "Opening blockchain.info failed. Please check your internet " +
|
||||
"connection.");
|
||||
|
@ -26,12 +26,8 @@ import io.bitsquare.gui.main.account.content.ContextAware;
|
||||
import io.bitsquare.gui.main.help.Help;
|
||||
import io.bitsquare.gui.main.help.HelpId;
|
||||
import io.bitsquare.gui.util.validation.InputValidator;
|
||||
import io.bitsquare.util.Utilities;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
|
||||
import java.util.Currency;
|
||||
@ -41,7 +37,6 @@ import javax.inject.Inject;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.util.Callback;
|
||||
@ -186,8 +181,8 @@ public class IrcAccountViewCB extends CachedViewCB<IrcAccountPm> implements Cont
|
||||
@FXML
|
||||
void onOpenIRC() {
|
||||
try {
|
||||
Desktop.getDesktop().browse(URI.create("https://webchat.freenode.net/?channels=bitsquare-trading"));
|
||||
} catch (IOException e) {
|
||||
Utilities.openURL("https://webchat.freenode.net/?channels=bitsquare-trading");
|
||||
} catch (Exception e) {
|
||||
log.error("Cannot open browser. " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user