DTG: Enable by default on Windows

This commit is contained in:
zzz
2016-09-24 14:54:30 +00:00
parent 1376237e08
commit b123720fa3
2 changed files with 8 additions and 3 deletions

View File

@ -214,7 +214,10 @@ public class ConfigServiceHandler extends FormHandler {
* @since 0.9.26 * @since 0.9.26
*/ */
public boolean isSystrayEnabled() { public boolean isSystrayEnabled() {
return _context.getBooleanProperty(RouterConsoleRunner.PROP_DTG_ENABLED); // default false for now, except on non-service windows
String sdtg = _context.getProperty(RouterConsoleRunner.PROP_DTG_ENABLED);
return Boolean.parseBoolean(sdtg) ||
(sdtg == null && SystemVersion.isWindows());
} }
@Override @Override

View File

@ -281,8 +281,10 @@ public class RouterConsoleRunner implements RouterApp {
return; return;
} }
try { try {
// default false for now // default false for now, except on non-service windows
boolean desktopguiEnabled = _context.getBooleanProperty(PROP_DTG_ENABLED); String sdtg = _context.getProperty(PROP_DTG_ENABLED);
boolean desktopguiEnabled = Boolean.parseBoolean(sdtg) ||
(sdtg == null && SystemVersion.isWindows());
if (desktopguiEnabled) { if (desktopguiEnabled) {
//Check if we are in a headless environment, set properties accordingly //Check if we are in a headless environment, set properties accordingly
System.setProperty("java.awt.headless", Boolean.toString(GraphicsEnvironment.isHeadless())); System.setProperty("java.awt.headless", Boolean.toString(GraphicsEnvironment.isHeadless()));