From 589d489eb925d2c028b9624c219db04ea10259c9 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 9 Nov 2015 12:30:29 -0800 Subject: [PATCH 1/3] Retain role field from menu items config --- src/menu-helpers.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menu-helpers.coffee b/src/menu-helpers.coffee index aa346200c..8ab10c048 100644 --- a/src/menu-helpers.coffee +++ b/src/menu-helpers.coffee @@ -46,7 +46,7 @@ normalizeLabel = (label) -> label.replace(/\&/g, '') cloneMenuItem = (item) -> - item = _.pick(item, 'type', 'label', 'enabled', 'visible', 'command', 'submenu', 'commandDetail') + item = _.pick(item, 'type', 'label', 'enabled', 'visible', 'command', 'submenu', 'commandDetail', 'role') if item.submenu? item.submenu = item.submenu.map (submenuItem) -> cloneMenuItem(submenuItem) item From 1ef7a2cc96d72c5a9ac386fa4b7d008bdaab696a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 9 Nov 2015 12:43:11 -0800 Subject: [PATCH 2/3] Add roles to services, window, and help menu items --- menus/darwin.cson | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/menus/darwin.cson b/menus/darwin.cson index 6fff290e2..f09f748b0 100644 --- a/menus/darwin.cson +++ b/menus/darwin.cson @@ -19,7 +19,7 @@ { type: 'separator' } { label: 'Install Shell Commands', command: 'window:install-shell-commands' } { type: 'separator' } - { label: 'Services', submenu: [] } + { label: 'Services', role: 'services', submenu: [] } { type: 'separator' } { label: 'Hide Atom', command: 'application:hide' } { label: 'Hide Others', command: 'application:hide-other-applications' } @@ -184,16 +184,18 @@ { label: 'Window' + role: 'window' submenu: [ { label: 'Minimize', command: 'application:minimize' } { label: 'Zoom', command: 'application:zoom' } { type: 'separator' } - { label: 'Bring All to Front', command: 'application:bring-all-windows-to-front' } + { label: 'Bring All to Front', command: 'application:bring-all-windows-to-front'} ] } { label: 'Help' + role: 'help' submenu: [ { label: 'Terms of Use', command: 'application:open-terms-of-use' } { label: 'Documentation', command: 'application:open-documentation' } From de6829d7b6246a9d501379d78f51eceaec9abf63 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 9 Nov 2015 12:47:21 -0800 Subject: [PATCH 3/3] :art: --- menus/darwin.cson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menus/darwin.cson b/menus/darwin.cson index f09f748b0..52b7a5bc8 100644 --- a/menus/darwin.cson +++ b/menus/darwin.cson @@ -189,7 +189,7 @@ { label: 'Minimize', command: 'application:minimize' } { label: 'Zoom', command: 'application:zoom' } { type: 'separator' } - { label: 'Bring All to Front', command: 'application:bring-all-windows-to-front'} + { label: 'Bring All to Front', command: 'application:bring-all-windows-to-front' } ] }