From af100839bf5f337ada23fc36aab80bd26c6a8969 Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Sat, 30 Jan 2016 18:16:16 -0500 Subject: [PATCH] Fix about dialog version after other app actions Auditors: @aekeus --- app/index.js | 7 +++---- app/menu.js | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/index.js b/app/index.js index e97d836ff8c..570c4eef90c 100644 --- a/app/index.js +++ b/app/index.js @@ -135,6 +135,8 @@ app.on('ready', function () { BrowserWindow.getFocusedWindow().webContents.send(messages.STOP_LOAD) }) + Menu.init() + // Load HTTPS Everywhere browser "extension" HttpsEverywhere.init() @@ -151,11 +153,8 @@ app.on('ready', function () { CrashHerald.init() // This loads package.json into an object + // TODO: Seems like this can be done with app.getVersion() insteand? PackageLoader.load((err, pack) => { - Menu.init({ - version: pack.version - }) - if (err) throw new Error('package.json could not be accessed') // Setup the auto updater, check the env variable first because it's diff --git a/app/menu.js b/app/menu.js index fb90f5dcbfc..ffd87c3c487 100644 --- a/app/menu.js +++ b/app/menu.js @@ -8,6 +8,7 @@ const AppConfig = require('../js/constants/appConfig') const Menu = require('menu') const messages = require('../js/constants/messages') const dialog = electron.dialog +const app = electron.app const AppActions = require('../js/actions/appActions') const CommonMenu = require('../js/commonMenu') const Filtering = require('./filtering') @@ -53,7 +54,7 @@ const init = (args) => { click: (item, focusedWindow) => { dialog.showMessageBox({ title: 'Brave', - message: 'Version: ' + args.version + '\n' + + message: 'Version: ' + app.getVersion() + '\n' + 'Electron: ' + process.versions['atom-shell'] + '\n' + 'libchromiumcontent: ' + process.versions['chrome'], icon: path.join(__dirname, 'img', 'braveBtn.png'),