From ec62d3bd43fc9d581f59e383c4478001f622605f Mon Sep 17 00:00:00 2001 From: "avi@chromium.org" Date: Wed, 21 Oct 2009 18:11:28 +0000 Subject: Mac: Switch from "Cancel" to "Do Nothing" for the external protocol dialog, and allow remembering the "Do Nothing" choice. BUG=none TEST=Verify that "Do Nothing" is the left button, and that clicking the "Remember" checkbox remembers the "Do Nothing" state. Review URL: http://codereview.chromium.org/314003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29671 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/generated_resources.grd | 3 +++ chrome/browser/cocoa/external_protocol_dialog.mm | 10 ++++------ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'chrome') diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 854bd7d..cc00a8000 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -4848,6 +4848,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Launch Application + + Do Nothing + The following application will be launched if you accept this request:\n\n $1C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe /u "%1" diff --git a/chrome/browser/cocoa/external_protocol_dialog.mm b/chrome/browser/cocoa/external_protocol_dialog.mm index cd79779..ae3d6c8 100644 --- a/chrome/browser/cocoa/external_protocol_dialog.mm +++ b/chrome/browser/cocoa/external_protocol_dialog.mm @@ -53,7 +53,8 @@ void ExternalProtocolHandler::RunExternalProtocolDialog( l10n_util::GetNSStringWithFixup(IDS_EXTERNAL_PROTOCOL_OK_BUTTON_TEXT)]; [allowButton setKeyEquivalent:@""]; // disallow as default [alert_ addButtonWithTitle: - l10n_util::GetNSStringWithFixup(IDS_CANCEL)]; + l10n_util::GetNSStringWithFixup( + IDS_EXTERNAL_PROTOCOL_CANCEL_BUTTON_TEXT)]; NSString* urlString = l10n_util::GetNSStringFWithFixup( IDS_EXTERNAL_PROTOCOL_INFORMATION, @@ -106,11 +107,8 @@ void ExternalProtocolHandler::RunExternalProtocolDialog( NOTREACHED(); } - // Set the "don't warn me again" info if the protocol was allowed ("cancel" - // always means "make this dialog go away with no permanent effect" no matter - // what). - if ([[alert_ suppressionButton] state] == NSOnState && - blockState == ExternalProtocolHandler::DONT_BLOCK) { + // Set the "don't warn me again" info. + if ([[alert_ suppressionButton] state] == NSOnState) { ExternalProtocolHandler::SetBlockState(UTF8ToWide(url_.scheme()), blockState); } -- cgit v1.1