mac: Pass useDefaultAccelerator to getAcceleratorForCommandId
This commit is contained in:
parent
77cdc2c4a7
commit
6381f44f26
17 changed files with 102 additions and 76 deletions
|
@ -106,9 +106,11 @@ Menu.prototype._init = function () {
|
|||
var command = this.commandsMap[commandId]
|
||||
return command != null ? command.visible : undefined
|
||||
},
|
||||
getAcceleratorForCommandId: (commandId) => {
|
||||
var command = this.commandsMap[commandId]
|
||||
return command != null ? command.accelerator : undefined
|
||||
getAcceleratorForCommandId: (commandId, useDefaultAccelerator) => {
|
||||
const command = this.commandsMap[commandId]
|
||||
if (command == null) return
|
||||
if (command.accelerator != null) return command.accelerator
|
||||
if (useDefaultAccelerator) return command.getDefaultRoleAccelerator()
|
||||
},
|
||||
getIconForCommandId: (commandId) => {
|
||||
var command = this.commandsMap[commandId]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue