Dropped I2PDesktop.java.

This commit is contained in:
dev
2011-06-28 13:17:58 +00:00
parent 95d4982a15
commit 3061a512e6
3 changed files with 2 additions and 34 deletions

View File

@ -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);
}

View File

@ -48,6 +48,7 @@ public class JSONInterface{
_log.error("Bad URL: http://"+srvHost+":"+srvPort+"/"+srvTarget, e);
}
session = new JSONRPC2Session(srvURL);
session.
}

View File

@ -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();
}
}
}