moved some constants, rename of Tray class

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5858 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
lotus 16 years ago
parent 54773ad4d4
commit b08991e278

@ -179,7 +179,7 @@ import de.anomic.yacy.yacyCore;
import de.anomic.yacy.yacyNewsPool;
import de.anomic.yacy.yacyNewsRecord;
import de.anomic.yacy.yacySeed;
import de.anomic.yacy.yacyTray;
import de.anomic.yacy.Tray;
import de.anomic.yacy.yacyURL;
import de.anomic.yacy.yacyUpdateLocation;
import de.anomic.yacy.yacyVersion;
@ -281,7 +281,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
serverInstantBusyThread.oneTimeJob(UPnP.class, "addPortMapping", UPnP.log, 0);
// init TrayIcon if possible
yacyTray.init(this);
Tray.init(this);
// remote proxy configuration
httpRemoteProxyConfig.init(this);
@ -1153,7 +1153,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
webIndex.close();
plasmaHTCache.close();
UPnP.deletePortMapping();
yacyTray.removeTray();
Tray.removeTray();
log.logConfig("SWITCHBOARD SHUTDOWN TERMINATED");
}

@ -515,4 +515,11 @@ public final class plasmaSwitchboardConstants {
public static final String BROWSER_POP_UP_PAGE = "browserPopUpPage";
public static final String UPNP_ENABLED = "upnp.enabled";
/**
* system tray
*/
public static final String TRAY_ICON_ENABLED = "trayIcon";
public static final String TRAY_LABEL = "tray.label";
public static final String BROWSERINTEGRATION = "browserintegration";
}

@ -38,10 +38,11 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.plasma.plasmaSwitchboardConstants;
import de.anomic.server.serverSystem;
public final class yacyTray {
public final class Tray {
private static plasmaSwitchboard sb;
private static nativeTrayIcon ti;
@ -56,10 +57,10 @@ public final class yacyTray {
public static void init(final plasmaSwitchboard par_sb) {
sb = par_sb;
isIntegrated = sb.getConfigBool("browserintegration", false);
trayLabel = sb.getConfig("tray.label", "YaCy");
isIntegrated = sb.getConfigBool(plasmaSwitchboardConstants.BROWSERINTEGRATION, false);
trayLabel = sb.getConfig(plasmaSwitchboardConstants.TRAY_LABEL, "YaCy");
try {
final boolean trayIcon = sb.getConfigBool("trayIcon", false);
final boolean trayIcon = sb.getConfigBool(plasmaSwitchboardConstants.TRAY_ICON_ENABLED, false);
if (trayIcon && serverSystem.isWindows) {
System.setProperty("java.awt.headless", "false");
@ -205,7 +206,7 @@ class nativeTrayIcon {
Object arglist1[] = new Object[3];
arglist1[0] = i;
arglist1[1] = yacyTray.trayLabel;
arglist1[1] = Tray.trayLabel;
arglist1[2] = menu;
this.TrayIcon = TrayIconConstructor.newInstance(arglist1);

@ -77,7 +77,7 @@ import de.anomic.tools.enumerateFiles;
import de.anomic.tools.Formatter;
import de.anomic.yacy.yacyClient;
import de.anomic.yacy.yacySeedDB;
import de.anomic.yacy.yacyTray;
import de.anomic.yacy.Tray;
import de.anomic.yacy.yacyURL;
import de.anomic.yacy.yacyVersion;
@ -352,7 +352,7 @@ public final class yacy {
}
// unlock yacyTray browser popup
yacyTray.lockBrowserPopup = false;
Tray.lockBrowserPopup = false;
// Copy the shipped locales into DATA, existing files are overwritten
final File locale_work = sb.getConfigPath("locale.work", "DATA/LOCALE/locales");

Loading…
Cancel
Save