Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1370)

Unified Diff: chrome/browser/js_modal_dialog_mac.mm

Issue 1758012: Explicitly tag the "cancel" button as being triggered by escape.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/js_modal_dialog_mac.mm
===================================================================
--- chrome/browser/js_modal_dialog_mac.mm (revision 45693)
+++ chrome/browser/js_modal_dialog_mac.mm (working copy)
@@ -139,8 +139,10 @@
[alert setInformativeText:base::SysWideToNSString(message_text_)];
[alert setMessageText:base::SysWideToNSString(title_)];
[alert addButtonWithTitle:default_button];
- if (!one_button)
- [alert addButtonWithTitle:other_button];
+ if (!one_button) {
+ NSButton* other = [alert addButtonWithTitle:other_button];
+ [other setKeyEquivalent:@"\e"];
+ }
if (display_suppress_checkbox_) {
[alert setShowsSuppressionButton:YES];
NSString* suppression_title = l10n_util::GetNSStringWithFixup(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698