From d42eae25f8db1c054ef0aa1b569d612487164465 Mon Sep 17 00:00:00 2001 From: lotus Date: Thu, 24 Jul 2008 06:49:30 +0000 Subject: [PATCH] yacyTray: fix for unproper shutdown some messages installer: start shortcuts minimized git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5014 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Steering.java | 6 ++++-- source/de/anomic/yacy/yacyTray.java | 3 ++- yacy.nsi | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/htroot/Steering.java b/htroot/Steering.java index 19a883ae2..d364f116c 100644 --- a/htroot/Steering.java +++ b/htroot/Steering.java @@ -33,6 +33,7 @@ import de.anomic.http.httpHeader; import de.anomic.plasma.plasmaSwitchboard; import de.anomic.server.serverObjects; import de.anomic.server.serverSwitch; +import de.anomic.yacy.yacyTray; import de.anomic.yacy.yacyVersion; public class Steering { @@ -54,13 +55,14 @@ public class Steering { if (post.containsKey("shutdown")) { sb.terminate(5000); prop.put("info", "3"); + if(yacyTray.isShown) sb.yacytray.displayBalloonMessage("Shutdown", "YaCy will terminate after working off all scheduled tasks."); return prop; } if (post.containsKey("restart")) { yacyVersion.restart(); prop.put("info", "4"); - + if(yacyTray.isShown) sb.yacytray.displayBalloonMessage("Restart", "YaCy will restart after working off all scheduled tasks."); return prop; } @@ -73,7 +75,7 @@ public class Steering { } prop.put("info", "5"); prop.put("info_release", releaseFileName); - + if(yacyTray.isShown) sb.yacytray.displayBalloonMessage("Update", "YaCy will be restarted after installation."); return prop; } return prop; diff --git a/source/de/anomic/yacy/yacyTray.java b/source/de/anomic/yacy/yacyTray.java index 9b7976c49..6a5e08c12 100644 --- a/source/de/anomic/yacy/yacyTray.java +++ b/source/de/anomic/yacy/yacyTray.java @@ -54,11 +54,12 @@ public class yacyTray implements ActionListener, ItemListener { private long t1; - final private static SystemTray tray = SystemTray.getDefaultSystemTray(); + private static SystemTray tray; private static TrayIcon ti; public yacyTray(plasmaSwitchboard sb, boolean showmenu) { this.sb = sb; + final SystemTray tray = SystemTray.getDefaultSystemTray(); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); diff --git a/yacy.nsi b/yacy.nsi index e238aae07..08b16f1d3 100755 --- a/yacy.nsi +++ b/yacy.nsi @@ -60,8 +60,8 @@ Section "Shortcuts in the Start Menu" SectionIn 1 2 3 SetShellVarContext current CreateDirectory "$SMPROGRAMS\YaCy" - CreateShortCut "$SMPROGRAMS\YaCy\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" - CreateShortCut "$SMPROGRAMS\YaCy\stop.lnk" "$INSTDIR\stopYACY.bat" "" "$INSTDIR\addon\YaCy.ico" + CreateShortCut "$SMPROGRAMS\YaCy\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" "" SW_SHOWMINIMIZED + CreateShortCut "$SMPROGRAMS\YaCy\stop.lnk" "$INSTDIR\stopYACY.bat" "" "$INSTDIR\addon\YaCy.ico" "" SW_SHOWMINIMIZED CreateShortCut "$SMPROGRAMS\YaCy\Readme.lnk" "$INSTDIR\readme.txt" CreateShortCut "$SMPROGRAMS\YaCy\Uninstall.lnk" "$INSTDIR\Uninstall.exe" SectionEnd @@ -69,12 +69,12 @@ SectionEnd Section "YaCy on the Desktop" SectionIn 1 2 3 SetShellVarContext current - CreateShortCut "$DESKTOP\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" + CreateShortCut "$DESKTOP\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" "" SW_SHOWMINIMIZED SectionEnd Section "YaCy in Startup" SetShellVarContext current - CreateShortCut "$SMSTARTUP\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" + CreateShortCut "$SMSTARTUP\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" "" SW_SHOWMINIMIZED SectionEnd Section "Uninstall"