fix plugin build

This commit is contained in:
eyedeekay
2024-03-07 13:25:50 -05:00
parent 113caaa922
commit 75049fa08e
2 changed files with 7 additions and 19 deletions

View File

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit! #Build Number for ANT. Do not edit!
#Thu Mar 07 12:01:15 EST 2024 #Thu Mar 07 13:23:49 EST 2024
build.number=707 build.number=708

View File

@ -103,10 +103,12 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
} }
if (dtg != null) { if (dtg != null) {
_log.info("I2P Browser integrating with I2P tray manager"); _log.info("I2P Browser integrating with I2P tray manager");
lmhs = dtg.addMenu("Launch I2P Browser (Safe Mode)", new Starter(dtg)); lmhs =
dtg.addMenu("Launch I2P Browser (Safe Mode)", new Starter(dtg));
dtg.showMenu(lmhs); dtg.showMenu(lmhs);
dtg.enableMenu(lmhs); dtg.enableMenu(lmhs);
lmhf = dtg.addMenu("Launch I2P Browser (Flexible Mode)", new FlexStarter(dtg)); lmhf = dtg.addMenu("Launch I2P Browser (Flexible Mode)",
new FlexStarter(dtg));
dtg.showMenu(lmhf); dtg.showMenu(lmhf);
dtg.enableMenu(lmhf); dtg.enableMenu(lmhf);
} else { } else {
@ -181,7 +183,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
public class FlexStarter implements MenuCallback { public class FlexStarter implements MenuCallback {
private final MenuService _ms; private final MenuService _ms;
public Starter(MenuService ms) { _ms = ms; } public FlexStarter(MenuService ms) { _ms = ms; }
public void clicked(MenuHandle menu) { public void clicked(MenuHandle menu) {
// Thread t = new I2PAppThread(new StarterThread(), // Thread t = new I2PAppThread(new StarterThread(),
//"I2PBrowser-Launcher start", true); //"I2PBrowser-Launcher start", true);
@ -199,20 +201,6 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
} }
} }
public class StarterThread implements Runnable {
public void run() {
_log.info("I2P Browser starting up");
try {
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
String[] args = {"http://proxy.i2p"};
i2pBrowser.launchFirefox(0, args);
} catch (Exception e) {
_log.error("Error starting I2P Browser", e);
}
_log.info("I2P Browser ran");
}
}
private synchronized void changeState(ClientAppState state) { private synchronized void changeState(ClientAppState state) {
if (_mgr != null) if (_mgr != null)
_mgr.notify(this, state, null, null); _mgr.notify(this, state, null, null);