From 653370974a5029ce88bced81a553f155a7eebd2c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 22 Jun 2016 13:15:20 -0700 Subject: [PATCH] :art: Sort roles alphabetically --- lib/browser/api/menu-item-roles.js | 120 ++++++++++++++--------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/lib/browser/api/menu-item-roles.js b/lib/browser/api/menu-item-roles.js index a5373c65aca2..6d6b0371e87c 100644 --- a/lib/browser/api/menu-item-roles.js +++ b/lib/browser/api/menu-item-roles.js @@ -1,23 +1,51 @@ const roles = { - undo: { - label: 'Undo', - accelerator: 'CmdOrCtrl+Z', - method: 'undo' + about: { + get label () { + const {app} = require('electron') + return `About ${app.getName()}` + } }, - redo: { - label: 'Redo', - accelerator: 'Shift+CmdOrCtrl+Z', - method: 'redo' + close: { + label: 'Close', + accelerator: 'CmdOrCtrl+W', + method: 'close' + }, + copy: { + label: 'Copy', + accelerator: 'CmdOrCtrl+C', + method: 'copy' }, cut: { label: 'Cut', accelerator: 'CmdOrCtrl+X', method: 'cut' }, - copy: { - label: 'Copy', - accelerator: 'CmdOrCtrl+C', - method: 'copy' + delete: { + label: 'Delete', + accelerator: 'Delete', + method: 'delete' + }, + front: { + label: 'Bring All to Front' + }, + help: { + label: 'Help' + }, + hide: { + get label () { + const {app} = require('electron') + return `Hide ${app.getName()}` + }, + accelerator: 'Command+H' + }, + hideothers: { + label: 'Hide Others', + accelerator: 'Command+Alt+H' + }, + minimize: { + label: 'Minimize', + accelerator: 'CmdOrCtrl+M', + method: 'minimize' }, paste: { label: 'Paste', @@ -29,26 +57,6 @@ const roles = { accelerator: 'Shift+Command+V', method: 'pasteAndMatchStyle' }, - selectall: { - label: 'Select All', - accelerator: 'CmdOrCtrl+A', - method: 'selectAll' - }, - minimize: { - label: 'Minimize', - accelerator: 'CmdOrCtrl+M', - method: 'minimize' - }, - close: { - label: 'Close', - accelerator: 'CmdOrCtrl+W', - method: 'close' - }, - delete: { - label: 'Delete', - accelerator: 'Delete', - method: 'delete' - }, quit: { get label () { const {app} = require('electron') @@ -57,45 +65,37 @@ const roles = { accelerator: process.platform === 'win32' ? null : 'Command+Q', method: 'quit' }, + redo: { + label: 'Redo', + accelerator: 'Shift+CmdOrCtrl+Z', + method: 'redo' + }, + selectall: { + label: 'Select All', + accelerator: 'CmdOrCtrl+A', + method: 'selectAll' + }, + services: { + label: 'Services' + }, togglefullscreen: { label: 'Toggle Full Screen', accelerator: process.platform === 'darwin' ? 'Ctrl+Command+F' : 'F11', method: 'toggleFullScreen' }, - help: { - label: 'Help' + undo: { + label: 'Undo', + accelerator: 'CmdOrCtrl+Z', + method: 'undo' + }, + unhide: { + label: 'Show All' }, window: { label: 'Window' }, - services: { - label: 'Services' - }, zoom: { label: 'Zoom' - }, - front: { - label: 'Bring All to Front' - }, - about: { - get label () { - const {app} = require('electron') - return `About ${app.getName()}` - } - }, - hide: { - get label () { - const {app} = require('electron') - return return `Hide ${app.getName()}` - }, - accelerator: 'Command+H' - }, - hideothers: { - label: 'Hide Others', - accelerator: 'Command+Alt+H' - }, - unhide: { - label: 'Show All' } }