some improvements for yacyTray

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5008 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
lotus 17 years ago
parent af616a92ff
commit 62afea0c9f

@ -1658,7 +1658,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
crawlQueues.close();
log.logConfig("SWITCHBOARD SHUTDOWN STEP 3: sending termination signal to database manager (stand by...)");
webIndex.close();
if(serverSystem.isWindows && !GraphicsEnvironment.isHeadless()) yacytray.removeTray();
if(yacyTray.isShown) yacytray.removeTray();
log.logConfig("SWITCHBOARD SHUTDOWN TERMINATED");
}

@ -49,6 +49,9 @@ public class yacyTray implements ActionListener, ItemListener {
plasmaSwitchboard sb;
public static boolean isShown = false;
public static boolean lockBrowserPopup = true;
private long t1;
final private static SystemTray tray = SystemTray.getDefaultSystemTray();
@ -111,11 +114,16 @@ public class yacyTray implements ActionListener, ItemListener {
}
});
tray.addTrayIcon(ti);
isShown = true;
}
private void trayClickAction(){ //detect doubleclick
if(System.currentTimeMillis() - t1 < 500){
if (lockBrowserPopup) {
displayBalloonMessage("YaCy","Please wait until YaCy is started.");
} else {
openBrowser("");
}
t1 = 0; //protecting against tripleclick
} else { t1 = System.currentTimeMillis(); }
}
@ -127,6 +135,7 @@ public class yacyTray implements ActionListener, ItemListener {
public void removeTray(){
tray.removeTrayIcon(ti);
isShown = false;
}
public void displayBalloonMessage(String title, String message){

@ -96,6 +96,7 @@ import de.anomic.tools.enumerateFiles;
import de.anomic.tools.yFormatter;
import de.anomic.yacy.yacyClient;
import de.anomic.yacy.yacySeedDB;
import de.anomic.yacy.yacyTray;
import de.anomic.yacy.yacyURL;
import de.anomic.yacy.yacyVersion;
@ -362,6 +363,9 @@ public final class yacy {
serverSystem.openBrowser((server.withSSL()?"https":"http") + "://localhost:" + serverCore.getPortNr(port) + "/" + browserPopUpPage, browserPopUpApplication);
}
// unlock yacyTray browser popup
yacyTray.lockBrowserPopup = false;
// Copy the shipped locales into DATA, existing files are overwritten
final File locale_work = sb.getConfigPath("locale.work", "DATA/LOCALE/locales");
final File locale_source = sb.getConfigPath("locale.source", "locales");

Loading…
Cancel
Save