Browse Source

fix menu bug.

oldj 10 years ago
parent
commit
436f452b10
2 changed files with 4 additions and 3 deletions
  1. 3 2
      app/js/menu.js
  2. 1 1
      app/main.js

+ 3 - 2
app/js/menu.js

@@ -6,8 +6,9 @@
 "use strict";
 
 const Menu = require('menu');
+const config = require('../config');
 
-function makeMenu(app) {
+function makeMenu(app, mainWindow) {
 
     let template = [{
         label: 'Edit',
@@ -119,7 +120,7 @@ function makeMenu(app) {
             }, {
                 label: 'Check for Updates...',
                 click: function () {
-                    require('./js/chk').chkUpdate(config.VERSION, mainWindow);
+                    require('./chk').chkUpdate(config.VERSION, mainWindow);
                 }
             }, {
                 type: 'separator'

+ 1 - 1
app/main.js

@@ -73,6 +73,6 @@ app.on('ready', function () {
         mainWindow.show();
     });
 
-    require('./js/menu').makeMenu(app);
+    require('./js/menu').makeMenu(app, mainWindow);
     require('./js/tray').makeTray(app);
 });