Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

experimental option trayIcon.force for unsupported platforms. java 1.6 needed

lotusbad7ce9286a5
diff --git a/defaults/yacy.init b/defaults/yacy.init
index 2ac37df88..ee28010f1 100644
--- a/defaults/yacy.init
+++ b/defaults/yacy.init
@@ -482,6 +482,7 @@ browserPopUpApplication=firefox
# defines if the YaCy icon appears in the system tray on supported platforms
trayIcon=true
+trayIcon.force=false
tray.label=YaCy
# index sharing attributes: by default, sharing is on.
diff --git a/source/de/anomic/plasma/plasmaSwitchboardConstants.java b/source/de/anomic/plasma/plasmaSwitchboardConstants.java
index f2ea41c1d..3a2b39015 100644
--- a/source/de/anomic/plasma/plasmaSwitchboardConstants.java
+++ b/source/de/anomic/plasma/plasmaSwitchboardConstants.java
@@ -521,6 +521,7 @@ public final class plasmaSwitchboardConstants {
* system tray
*/
public static final String TRAY_ICON_ENABLED = "trayIcon";
+ public static final String TRAY_ICON_FORCED = "trayIcon.force";
public static final String TRAY_LABEL = "tray.label";
public static final String BROWSERINTEGRATION = "browserintegration";
}
diff --git a/source/de/anomic/yacy/Tray.java b/source/de/anomic/yacy/Tray.java
index f6e126ccd..76d7cdd72 100644
--- a/source/de/anomic/yacy/Tray.java
+++ b/source/de/anomic/yacy/Tray.java
@@ -61,7 +61,7 @@ public final class Tray {
trayLabel = sb.getConfig(plasmaSwitchboardConstants.TRAY_LABEL, "YaCy");
try {
final boolean trayIcon = sb.getConfigBool(plasmaSwitchboardConstants.TRAY_ICON_ENABLED, false);
- if (trayIcon && serverSystem.isWindows) {
+ if (trayIcon && (serverSystem.isWindows || sb.getConfigBool(plasmaSwitchboardConstants.TRAY_ICON_FORCED, false))) {
System.setProperty("java.awt.headless", "false");
if(nativeTrayIcon.isSupported()) {