From bfd09a058eb4f056ffa3966d2d2c4782156d7bd1 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 11 May 2016 22:12:44 +0200 Subject: [PATCH] Small style tweaks --- main/vlc.js | 3 +-- main/windows.js | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/main/vlc.js b/main/vlc.js index b619a047..b2ff659b 100644 --- a/main/vlc.js +++ b/main/vlc.js @@ -12,8 +12,7 @@ function checkForVLC (cb) { vlcCommand((err) => cb(!err)) } -// Finds if VLC is installed on Mac, Windows, or Linux. -// Uses child_process.spawn() to return a ChildProcess object +// Spawns VLC with child_process.spawn() to return a ChildProcess object // Calls back with (err, childProcess) function spawn (args, cb) { vlcCommand(function (err, vlcPath) { diff --git a/main/windows.js b/main/windows.js index 01ad5ad8..ae8e3af3 100644 --- a/main/windows.js +++ b/main/windows.js @@ -9,6 +9,8 @@ var windows = module.exports = { var electron = require('electron') +var app = electron.app + var config = require('../config') var menu = require('./menu') var tray = require('./tray') @@ -68,7 +70,7 @@ function createWebTorrentHiddenWindow () { // Prevent killing the WebTorrent process win.on('close', function (e) { - if (!electron.app.isQuitting) { + if (!app.isQuitting) { e.preventDefault() win.hide() } @@ -116,8 +118,8 @@ function createMainWindow () { win.on('close', function (e) { if (process.platform !== 'darwin' && !tray.hasTray()) { - electron.app.quit() - } else if (!electron.app.isQuitting) { + app.quit() + } else if (!app.isQuitting) { e.preventDefault() win.hide() win.send('dispatch', 'backToList')