follow style guidelines
This commit is contained in:
parent
803b06b7de
commit
fee301e768
3 changed files with 8 additions and 7 deletions
|
@ -91,10 +91,10 @@ module.exports =
|
|||
|
||||
throw new TypeError('Buttons need to be array') unless Array.isArray options.buttons
|
||||
|
||||
options.title ?= ''
|
||||
options.message ?= ''
|
||||
options.detail ?= ''
|
||||
options.icon ?= null
|
||||
options.title ?= ''
|
||||
options.message ?= ''
|
||||
options.detail ?= ''
|
||||
options.icon ?= null
|
||||
options.defaultId ?= -1
|
||||
|
||||
# Choose a default button to get selected when dialog is cancelled.
|
||||
|
|
|
@ -84,9 +84,9 @@ NSAlert* CreateNSAlert(NativeWindow* parent_window,
|
|||
[button setTag:i];
|
||||
|
||||
if (i == (size_t)default_id) {
|
||||
// focus the button at default_id if the user opted to do so.
|
||||
// Focus the button at default_id if the user opted to do so.
|
||||
// The first button added gets set as the default selected.
|
||||
// So remove that default, and make the requested button the default
|
||||
// So remove that default, and make the requested button the default.
|
||||
[[[alert buttons] objectAtIndex:0] setKeyEquivalent:@""];
|
||||
[button setKeyEquivalent:@"\r"];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue