mirror of https://github.com/docker/docs.git
Replace 'save' with 'close'
This commit is contained in:
parent
fafc9d0793
commit
1a3768fa29
|
@ -38,13 +38,13 @@ app.on('activate-with-no-open-windows', function () {
|
||||||
|
|
||||||
app.on('ready', function() {
|
app.on('ready', function() {
|
||||||
mainWindow = new BrowserWindow(windowOptions);
|
mainWindow = new BrowserWindow(windowOptions);
|
||||||
var saveVMOnQuit = false;
|
var closeVMOnQuit = false;
|
||||||
if (argv.test) {
|
if (argv.test) {
|
||||||
mainWindow.loadUrl(path.normalize('file://' + path.join(__dirname, '..', 'build/tests.html')));
|
mainWindow.loadUrl(path.normalize('file://' + path.join(__dirname, '..', 'build/tests.html')));
|
||||||
} else {
|
} else {
|
||||||
mainWindow.loadUrl(path.normalize('file://' + path.join(__dirname, '..', 'build/index.html')));
|
mainWindow.loadUrl(path.normalize('file://' + path.join(__dirname, '..', 'build/index.html')));
|
||||||
app.on('will-quit', function () {
|
app.on('will-quit', function () {
|
||||||
if (saveVMOnQuit) {
|
if (closeVMOnQuit) {
|
||||||
exec('/usr/bin/VBoxManage controlvm dev poweroff', function () {});
|
exec('/usr/bin/VBoxManage controlvm dev poweroff', function () {});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -97,14 +97,14 @@ app.on('ready', function() {
|
||||||
ipc.on('command', function (event, arg) {
|
ipc.on('command', function (event, arg) {
|
||||||
console.log('Command: ' + arg);
|
console.log('Command: ' + arg);
|
||||||
if (arg === 'application:quit-install') {
|
if (arg === 'application:quit-install') {
|
||||||
saveVMOnQuit = false;
|
closeVMOnQuit = false;
|
||||||
autoUpdater.quitAndInstall();
|
autoUpdater.quitAndInstall();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ipc.on('vm', function (event, arg) {
|
ipc.on('vm', function (event, arg) {
|
||||||
saveVMOnQuit = arg;
|
closeVMOnQuit = arg;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue