Fix server console not shutting down with new icons

This commit is contained in:
Ryan Huffman 2016-02-11 10:32:26 -08:00
parent eabe3188b3
commit c4c1fdc6db

View file

@ -134,7 +134,7 @@ function shutdownCallback(idx) {
homeServer.stop(); homeServer.stop();
} }
updateTrayMenu(null); updateTrayMenu(homeServer.state);
if (homeServer.state == ProcessGroupStates.STOPPED) { if (homeServer.state == ProcessGroupStates.STOPPED) {
// if the home server is already down, take down the server console now // if the home server is already down, take down the server console now
@ -594,7 +594,7 @@ function updateMenuArray(menuArray, serverState) {
function updateTrayMenu(serverState) { function updateTrayMenu(serverState) {
if (tray) { if (tray) {
var menuArray = buildMenuArray(serverState); var menuArray = buildMenuArray(isShuttingDown ? null : serverState);
tray.setImage(trayIcons[serverState]); tray.setImage(trayIcons[serverState]);
tray.setContextMenu(Menu.buildFromTemplate(menuArray)); tray.setContextMenu(Menu.buildFromTemplate(menuArray));
if (isShuttingDown) { if (isShuttingDown) {