'use strict';

var app = require('app');
var Menu = require('menu');
var BrowserWindow = require('browser-window');

module.exports.setDevMenu = function () {
    var devMenu = Menu.buildFromTemplate([{
        label: 'Development',
        submenu: [{
            label: 'Reload',
            accelerator: 'Command+R',
            click: function () {
                BrowserWindow.getFocusedWindow().reloadIgnoringCache();
            }
        },{
            label: 'Toggle DevTools',
            accelerator: 'Alt+Command+I',
            click: function () {
                BrowserWindow.getFocusedWindow().toggleDevTools();
            }
        },{
            label: 'Quit',
            accelerator: 'Command+Q',
            click: function () {
                app.quit();
            }
        }]
    }]);
    Menu.setApplicationMenu(devMenu);
};

'use strict';

var app = require('app');
var Menu = require('menu');
var BrowserWindow = require('browser-window');

module.exports.setDevMenu = function () {
    var devMenu = Menu.buildFromTemplate([{
        label: 'Development',
        submenu: [{
            label: 'Reload',
            accelerator: 'CmdOrCtrl+R',
            click: function () {
                BrowserWindow.getFocusedWindow().reloadIgnoringCache();
            }
        },{
            label: 'Toggle DevTools',
            accelerator: 'Alt+CmdOrCtrl+I',
            click: function () {
                BrowserWindow.getFocusedWindow().toggleDevTools();
            }
        },{
            label: 'Quit',
            accelerator: 'CmdOrCtrl+Q',
            click: function () {
                app.quit();
            }
        }]
    }]);
    Menu.setApplicationMenu(devMenu);
};

Update menu accelerators for cross platform compatibility. Simple update to be able to use the development menu accelerators on Windows and Linux and to remove the accelerator warnings on these platforms: [584:0617/135533:WARNING:accelerator_util.cc(185)] Invalid accelerator token: command [584:0617/135533:WARNING:accelerator_util.cc(185)] Invalid accelerator token: command [584:0617/135533:WARNING:accelerator_util.cc(185)] Invalid accelerator token: command
Update menu accelerators for cross platform compatibility.
Simple update to be able to use the development menu accelerators on Windows and Linux and to remove the accelerator warnings on these platforms:
[584:0617/135533:WARNING:accelerator_util.cc(185)] Invalid accelerator token: command
[584:0617/135533:WARNING:accelerator_util.cc(185)] Invalid accelerator token: command
[584:0617/135533:WARNING:accelerator_util.cc(185)] Invalid accelerator token: command
