Small style tweaks
This commit is contained in:
@@ -12,8 +12,7 @@ function checkForVLC (cb) {
|
|||||||
vlcCommand((err) => cb(!err))
|
vlcCommand((err) => cb(!err))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finds if VLC is installed on Mac, Windows, or Linux.
|
// Spawns VLC with child_process.spawn() to return a ChildProcess object
|
||||||
// Uses child_process.spawn() to return a ChildProcess object
|
|
||||||
// Calls back with (err, childProcess)
|
// Calls back with (err, childProcess)
|
||||||
function spawn (args, cb) {
|
function spawn (args, cb) {
|
||||||
vlcCommand(function (err, vlcPath) {
|
vlcCommand(function (err, vlcPath) {
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ var windows = module.exports = {
|
|||||||
|
|
||||||
var electron = require('electron')
|
var electron = require('electron')
|
||||||
|
|
||||||
|
var app = electron.app
|
||||||
|
|
||||||
var config = require('../config')
|
var config = require('../config')
|
||||||
var menu = require('./menu')
|
var menu = require('./menu')
|
||||||
var tray = require('./tray')
|
var tray = require('./tray')
|
||||||
@@ -68,7 +70,7 @@ function createWebTorrentHiddenWindow () {
|
|||||||
|
|
||||||
// Prevent killing the WebTorrent process
|
// Prevent killing the WebTorrent process
|
||||||
win.on('close', function (e) {
|
win.on('close', function (e) {
|
||||||
if (!electron.app.isQuitting) {
|
if (!app.isQuitting) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
win.hide()
|
win.hide()
|
||||||
}
|
}
|
||||||
@@ -116,8 +118,8 @@ function createMainWindow () {
|
|||||||
|
|
||||||
win.on('close', function (e) {
|
win.on('close', function (e) {
|
||||||
if (process.platform !== 'darwin' && !tray.hasTray()) {
|
if (process.platform !== 'darwin' && !tray.hasTray()) {
|
||||||
electron.app.quit()
|
app.quit()
|
||||||
} else if (!electron.app.isQuitting) {
|
} else if (!app.isQuitting) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
win.hide()
|
win.hide()
|
||||||
win.send('dispatch', 'backToList')
|
win.send('dispatch', 'backToList')
|
||||||
|
|||||||
Reference in New Issue
Block a user