Replace 'save' with 'close'

This commit is contained in:
Jeffrey Morgan 2015-02-26 22:16:54 -05:00
parent fafc9d0793
commit 1a3768fa29
1 changed files with 4 additions and 4 deletions

View File

@ -38,13 +38,13 @@ app.on('activate-with-no-open-windows', function () {
app.on('ready', function() {
mainWindow = new BrowserWindow(windowOptions);
var saveVMOnQuit = false;
var closeVMOnQuit = false;
if (argv.test) {
mainWindow.loadUrl(path.normalize('file://' + path.join(__dirname, '..', 'build/tests.html')));
} else {
mainWindow.loadUrl(path.normalize('file://' + path.join(__dirname, '..', 'build/index.html')));
app.on('will-quit', function () {
if (saveVMOnQuit) {
if (closeVMOnQuit) {
exec('/usr/bin/VBoxManage controlvm dev poweroff', function () {});
}
});
@ -97,14 +97,14 @@ app.on('ready', function() {
ipc.on('command', function (event, arg) {
console.log('Command: ' + arg);
if (arg === 'application:quit-install') {
saveVMOnQuit = false;
closeVMOnQuit = false;
autoUpdater.quitAndInstall();
}
});
}
ipc.on('vm', function (event, arg) {
saveVMOnQuit = arg;
closeVMOnQuit = arg;
});
});
});