I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 97fca968 authored by zzz's avatar zzz
Browse files

DTG: Can't do first-time startup from /configservice,

restart required
parent 702e1c5a
No related branches found
No related tags found
No related merge requests found
...@@ -332,15 +332,25 @@ public class ConfigServiceHandler extends FormHandler { ...@@ -332,15 +332,25 @@ public class ConfigServiceHandler extends FormHandler {
ClientApp dtg = mgr.getRegisteredApp("desktopgui"); ClientApp dtg = mgr.getRegisteredApp("desktopgui");
if (dtg != null) { if (dtg != null) {
if (enable) { if (enable) {
if (dtg.getState() == ClientAppState.STOPPED) if (dtg.getState() == ClientAppState.STOPPED) {
dtg.startup(); dtg.startup();
addFormNotice(_t("Enabled system tray"));
}
} else { } else {
if (dtg.getState() == ClientAppState.RUNNING) if (dtg.getState() == ClientAppState.RUNNING) {
dtg.shutdown(null); dtg.shutdown(null);
addFormNotice(_t("Disabled system tray"));
}
} }
} else if (enable) { } else if (enable) {
// already set to true, GraphicsEnvironment initialized, can't change it now
if (Boolean.valueOf(System.getProperty("java.awt.headless"))) {
addFormError(_t("Restart required to take effect"));
} else {
dtg = new net.i2p.desktopgui.Main(_context, mgr, null); dtg = new net.i2p.desktopgui.Main(_context, mgr, null);
dtg.startup(); dtg.startup();
addFormNotice(_t("Enabled system tray"));
}
} }
} catch (Throwable t) { } catch (Throwable t) {
if (enable) if (enable)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment