clang-format again
This commit is contained in:
@ -461,7 +461,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
||||
<exec executable="clang-format">
|
||||
<arg value="-i"/>
|
||||
<arg value="src/java/net/i2p/i2pfirefox/I2PBrowser.java"/>
|
||||
<arg value="src/java/net/i2p/i2pfirefox/I2PBrowserPlugin.java"/>
|
||||
<arg value="src/plugin/net/i2p/i2pfirefox/plugin/plugin/I2PBrowserPlugin.java"/>
|
||||
<arg value="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java"/>
|
||||
<arg value="src/java/net/i2p/i2pfirefox/I2PChromium.java"/>
|
||||
<arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java"/>
|
||||
|
@ -2,7 +2,6 @@ package net.i2p.i2pfirefox.plugin;
|
||||
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.io.File;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.app.ClientApp;
|
||||
import net.i2p.app.ClientAppManager;
|
||||
@ -83,15 +82,16 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
}
|
||||
public void shutdown(String[] args) {
|
||||
if (!isSystrayEnabled()) {
|
||||
i2pBrowser.logger.info("I2P Browser tray manager not supported");
|
||||
_log.info("I2P Browser tray manager not supported");
|
||||
i2pBrowser.stop();
|
||||
changeState(ClientAppState.STOPPED);
|
||||
return;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
public void startup() {
|
||||
if (!isSystrayEnabled()) {
|
||||
i2pBrowser.logger.info("I2P Browser tray manager not supported");
|
||||
_log.info("I2P Browser tray manager not supported");
|
||||
try {
|
||||
String url = "http://proxy.i2p";
|
||||
i2pBrowser.launchFirefox(0, new String[] {url});
|
||||
@ -99,10 +99,10 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
String url = "http://proxy.i2p";
|
||||
i2pBrowser.logger.info(
|
||||
_log.info(
|
||||
"Starting I2P Browser tray manager by testing http://proxy.i2p");
|
||||
MenuService dtg = startTrayApp();
|
||||
try {
|
||||
@ -118,6 +118,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Copied directly from I2PSnark-standalone
|
||||
private MenuService startTrayApp() {
|
||||
@ -136,9 +137,9 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
}
|
||||
|
||||
// Copied directly from I2PSnark-standalone where it is used to determine
|
||||
// whether to launchFirefox the tray app Our environment should basically never be
|
||||
// headless, that doesn't make any sense, but something tells me I should
|
||||
// leave that check in.
|
||||
// whether to launchFirefox the tray app Our environment should basically
|
||||
// never be headless, that doesn't make any sense, but something tells me I
|
||||
// should leave that check in.
|
||||
private boolean isSystrayEnabled() {
|
||||
if (GraphicsEnvironment.isHeadless())
|
||||
return false;
|
||||
@ -211,7 +212,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
private synchronized void changeState(ClientAppState state) {
|
||||
if (_mgr != null)
|
||||
_mgr.notify(this, state, null, null);
|
||||
}
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
I2PBrowserPlugin plugin = new I2PBrowserPlugin();
|
||||
try {
|
||||
|
Reference in New Issue
Block a user