forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p' (head dbe319d674d6a6a53491762262978f53caaaa58a)
to branch 'i2p.i2p.mathiasdm.desktopgui' (head fced1e04334ef1c18bc6ae8a31984e627310b14c)
This commit is contained in:
@ -88,30 +88,6 @@ public class ConfigServiceHandler extends FormHandler {
|
||||
addFormError("Warning: unable to contact the service manager - " + t.getMessage());
|
||||
}
|
||||
addFormNotice("Threads dumped to wrapper.log");
|
||||
} else if (_("Show systray icon").equals(_action)) {
|
||||
try {
|
||||
SysTray tray = SysTray.getInstance();
|
||||
if (tray != null) {
|
||||
tray.show();
|
||||
addFormNotice(_("System tray icon enabled."));
|
||||
} else {
|
||||
addFormNotice(_("System tray icon feature not supported on this platform. Sorry!"));
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
addFormError(_("Warning: unable to contact the systray manager") + " - " + t.getMessage());
|
||||
}
|
||||
} else if (_("Hide systray icon").equals(_action)) {
|
||||
try {
|
||||
SysTray tray = SysTray.getInstance();
|
||||
if (tray != null) {
|
||||
tray.hide();
|
||||
addFormNotice(_("System tray icon disabled."));
|
||||
} else {
|
||||
addFormNotice(_("System tray icon feature not supported on this platform. Sorry!"));
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
addFormError(_("Warning: unable to contact the systray manager") + " - " + t.getMessage());
|
||||
}
|
||||
} else if (_("View console on startup").equals(_action)) {
|
||||
browseOnStartup(true);
|
||||
addFormNotice(_("Console is to be shown on startup"));
|
||||
|
@ -18,7 +18,21 @@ public class ContentHelper extends HelperBase {
|
||||
public void setStartAtBeginning(String moo) {
|
||||
_startAtBeginning = Boolean.valueOf(""+moo).booleanValue();
|
||||
}
|
||||
public void setLang(String l) { _lang = l; }
|
||||
public void setLang(String l) {
|
||||
if((_lang == null || !_lang.equals(l)) && (l != null)) {
|
||||
//Set language for router console
|
||||
_lang = l;
|
||||
|
||||
if(_context == null) {
|
||||
setContextId(null);
|
||||
}
|
||||
|
||||
//Set language persistently throughout I2P
|
||||
_context.router().setConfigSetting(Messages.PROP_LANG, _lang);
|
||||
_context.router().saveConfig();
|
||||
_context.setProperty(Messages.PROP_LANG, _lang);
|
||||
}
|
||||
}
|
||||
|
||||
public void setMaxLines(String lines) {
|
||||
if (lines != null) {
|
||||
|
@ -10,7 +10,7 @@ import java.util.Properties;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.apps.systray.SysTray;
|
||||
import net.i2p.desktopgui.Main;
|
||||
import net.i2p.data.Base32;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.router.RouterContext;
|
||||
@ -19,6 +19,7 @@ import net.i2p.util.I2PAppThread;
|
||||
import net.i2p.util.SecureDirectory;
|
||||
import net.i2p.util.SecureFileOutputStream;
|
||||
import net.i2p.util.ShellCommand;
|
||||
import net.i2p.util.VersionComparator;
|
||||
|
||||
import org.mortbay.http.DigestAuthenticator;
|
||||
import org.mortbay.http.HashUserRealm;
|
||||
@ -301,7 +302,13 @@ public class RouterConsoleRunner {
|
||||
}
|
||||
|
||||
try {
|
||||
SysTray tray = SysTray.getInstance();
|
||||
//TODO: move away from routerconsole into a separate application.
|
||||
//ApplicationManager?
|
||||
VersionComparator v = new VersionComparator();
|
||||
if(v.compare(System.getProperty("java.runtime.version"), "1.6") >= 0) {
|
||||
String[] args = new String[0];
|
||||
net.i2p.desktopgui.Main.beginStartup(args);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
|
Reference in New Issue
Block a user