From bad7ce9286a534d1a3f48f050bc1f68dc784e552 Mon Sep 17 00:00:00 2001 From: lotus Date: Sat, 9 May 2009 18:35:02 +0000 Subject: [PATCH] experimental option trayIcon.force for unsupported platforms. java 1.6 needed git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5936 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- defaults/yacy.init | 1 + source/de/anomic/plasma/plasmaSwitchboardConstants.java | 1 + source/de/anomic/yacy/Tray.java | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) 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()) {