|
|
|
@ -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){
|
|
|
|
|