From 4b86115d30ed54643310eb4e248b46e30ed9e35a Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Thu, 17 Jun 2010 00:04:49 -0400 Subject: [PATCH] Set the alert default button using the CPCarriageReturnCharacter key equivalent to match the recent Cappuccino change for default buttons. --- AppKit/CPAlert.j | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 500d46365..9f935f145 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -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];