fix(menus): Add Thread menu to win/linux, fix disabling

This commit is contained in:
Ben Gotow 2016-04-27 13:24:43 -07:00
parent e3cba1cae5
commit 81f94943d6
3 changed files with 27 additions and 1 deletions

View file

@ -47,6 +47,19 @@
{ "label": "Toggle &Full Screen", "command": "window:toggle-full-screen" }
]
},
{
"label": "Thread",
"submenu": [
{ "label": "Reply", "command": "core:reply" },
{ "label": "Reply All", "command": "core:reply-all" },
{ "label": "Forward", "command": "core:forward" },
{ "type": "separator" },
{ "label": "Star", "command": "core:star-item" },
{ "type": "separator", "id": "thread-actions" },
{ "label": "Remove from view", "command": "core:remove-from-view" },
{ "type": "separator", "id": "view-actions" }
]
},
{
"label": "Developer",
"submenu": [

View file

@ -30,6 +30,19 @@
{ "label": "Toggle &Full Screen", "command": "window:toggle-full-screen" }
]
},
{
"label": "Thread",
"submenu": [
{ "label": "Reply", "command": "core:reply" },
{ "label": "Reply All", "command": "core:reply-all" },
{ "label": "Forward", "command": "core:forward" },
{ "type": "separator" },
{ "label": "Star", "command": "core:star-item" },
{ "type": "separator", "id": "thread-actions" },
{ "label": "Remove from view", "command": "core:remove-from-view" },
{ "type": "separator", "id": "view-actions" }
]
},
{
"label": "Developer",
"submenu": [

View file

@ -58,7 +58,7 @@ class MenuManager
if item.command and item.command.startsWith('application:') is false
item.enabled = NylasEnv.commands.listenerCountForCommand(item.command) > 0
if item.submenu?
item.enabled = _.every item.submenu, (item) -> item.enabled is false
item.enabled = not _.every item.submenu, (item) -> item.enabled is false
@sendToBrowserProcess(@template, NylasEnv.keymaps.getBindingsForAllCommands())
loadPlatformItems: ->