Skip to content

Commit

Permalink
Set the alert default button using the CPCarriageReturnCharacter key …
Browse files Browse the repository at this point in the history
…equivalent to match the recent Cappuccino change for default buttons.
  • Loading branch information
aljungberg authored and Ross Boucher committed Jun 19, 2010
1 parent 12a49d0 commit 4b86115
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion AppKit/CPAlert.j
Expand Up @@ -301,9 +301,11 @@ var CPAlertWarningImage,
[[_alertPanel contentView] addSubview:button];

if (_buttonCount == 0)
[_alertPanel setDefaultButton:button];
[button setKeyEquivalent:CPCarriageReturnCharacter];
else if ([title lowercaseString] === "cancel")
[button setKeyEquivalent:CPEscapeFunctionKey];
else
[button setKeyEquivalent:nil];

_buttonCount++;
[_buttons addObject:button];
Expand Down

0 comments on commit 4b86115

Please sign in to comment.