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

Unified Diff: chrome/browser/cocoa/extension_install_prompt.mm

Issue 463008: Makes 'Cancel' the default button for extension install/uninstall confirmatio... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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/cocoa/extension_install_prompt.mm
===================================================================
--- chrome/browser/cocoa/extension_install_prompt.mm (revision 33598)
+++ chrome/browser/cocoa/extension_install_prompt.mm (working copy)
@@ -22,11 +22,18 @@
Profile* profile, Delegate* delegate, Extension* extension, SkBitmap* icon,
const std::wstring& warning_text, bool is_uninstall) {
NSAlert* alert = [[[NSAlert alloc] init] autorelease];
- [alert addButtonWithTitle:l10n_util::GetNSString(
+
+ NSButton* continueButton = [alert addButtonWithTitle:l10n_util::GetNSString(
is_uninstall ? IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON :
IDS_EXTENSION_PROMPT_INSTALL_BUTTON)];
- [alert addButtonWithTitle:l10n_util::GetNSString(
+ // Clear the key equivalent (currently 'Return') because cancel is the default
+ // button.
+ [continueButton setKeyEquivalent:@""];
+
+ NSButton* cancelButton = [alert addButtonWithTitle:l10n_util::GetNSString(
IDS_EXTENSION_PROMPT_CANCEL_BUTTON)];
+ [cancelButton setKeyEquivalent:@"\r"];
+
[alert setMessageText:l10n_util::GetNSStringF(
is_uninstall ? IDS_EXTENSION_UNINSTALL_PROMPT_HEADING :
IDS_EXTENSION_INSTALL_PROMPT_HEADING,
« 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