Skip to content

Commit

Permalink
Cut out unnecessary Squid
Browse files Browse the repository at this point in the history
  • Loading branch information
FayeAlephNil committed Apr 26, 2015
1 parent 5dca57b commit a575c4e
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 527 deletions.
2 changes: 1 addition & 1 deletion src/main/java/pt/uptodate/gui/GuiUpdates.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.minecraft.client.gui.GuiButton;
import pt.uptodate.FetchedUpdateable;
import pt.uptodate.UpToDate;
import pt.uptodate.util.io.WebUtils;
import pt.uptodate.util.WebUtils;

public class GuiUpdates extends GuiBase {

Expand Down
49 changes: 49 additions & 0 deletions src/main/java/pt/uptodate/util/WebUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package pt.uptodate.util;


import java.awt.*;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;

public class WebUtils {

public static URL newURL(String url) {
if (!url.contains("://")) {
url = "http://" + url;
}
try {
return new URL(url);
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}

public static void openBrowser(String url) {
openBrowser(newURL(url));
}

public static void openBrowser(URL url) {
openBrowser(newURI(url));
}

public static void openBrowser(URI uri) {
try {
Desktop.getDesktop().browse(uri);
} catch (IOException e) {
e.printStackTrace();
}
}

private static URI newURI(URL url) {
try {
return url.toURI();
} catch (URISyntaxException e) {
e.printStackTrace();
return null;
}
}
}
39 changes: 0 additions & 39 deletions src/main/java/pt/uptodate/util/io/FileFilters.java

This file was deleted.

270 changes: 0 additions & 270 deletions src/main/java/pt/uptodate/util/io/IOUtils.java

This file was deleted.

Loading

0 comments on commit a575c4e

Please sign in to comment.