Dropped I2PDesktop.java.
This commit is contained in:
@ -16,7 +16,6 @@ import javax.swing.SwingWorker;
|
||||
|
||||
import net.i2p.itoopie.i18n.ItoopieTranslator;
|
||||
import net.i2p.itoopie.util.BrowseException;
|
||||
import net.i2p.itoopie.util.I2PDesktop;
|
||||
|
||||
/**
|
||||
* Manages the tray icon life.
|
||||
@ -116,7 +115,7 @@ public class TrayManager {
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
I2PDesktop.browse("http://localhost:7657");
|
||||
System.out.println("Tried to open a browser");
|
||||
} catch (BrowseException e1) {
|
||||
//log.log(Log.WARN, "Failed to open browser!", e1);
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ public class JSONInterface{
|
||||
_log.error("Bad URL: http://"+srvHost+":"+srvPort+"/"+srvTarget, e);
|
||||
}
|
||||
session = new JSONRPC2Session(srvURL);
|
||||
session.
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,32 +0,0 @@
|
||||
package net.i2p.itoopie.util;
|
||||
|
||||
import java.awt.Desktop;
|
||||
import java.awt.TrayIcon;
|
||||
import java.awt.Desktop.Action;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
|
||||
public class I2PDesktop {
|
||||
|
||||
|
||||
public static void browse(String url) throws BrowseException {
|
||||
if(Desktop.isDesktopSupported()) {
|
||||
Desktop desktop = Desktop.getDesktop();
|
||||
if(desktop.isSupported(Action.BROWSE)) {
|
||||
try {
|
||||
desktop.browse(new URI(url));
|
||||
} catch (Exception e) {
|
||||
throw new BrowseException();
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new BrowseException();
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new BrowseException();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user