mac: Pass useDefaultAccelerator to getAcceleratorForCommandId
This commit is contained in:
parent
77cdc2c4a7
commit
6381f44f26
17 changed files with 102 additions and 76 deletions
|
@ -31,7 +31,7 @@ const MenuItem = function (options) {
|
|||
|
||||
this.overrideReadOnlyProperty('type', 'normal')
|
||||
this.overrideReadOnlyProperty('role')
|
||||
this.overrideReadOnlyProperty('accelerator', roles.getDefaultAccelerator(this.role))
|
||||
this.overrideReadOnlyProperty('accelerator')
|
||||
this.overrideReadOnlyProperty('icon')
|
||||
this.overrideReadOnlyProperty('submenu')
|
||||
|
||||
|
@ -66,6 +66,10 @@ const MenuItem = function (options) {
|
|||
|
||||
MenuItem.types = ['normal', 'separator', 'submenu', 'checkbox', 'radio']
|
||||
|
||||
MenuItem.prototype.getDefaultRoleAccelerator = function () {
|
||||
return roles.getDefaultAccelerator(this.role)
|
||||
}
|
||||
|
||||
MenuItem.prototype.overrideProperty = function (name, defaultValue) {
|
||||
if (defaultValue == null) {
|
||||
defaultValue = null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue