diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 18:11:28 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 18:11:28 +0000 |
commit | ec62d3bd43fc9d581f59e383c4478001f622605f (patch) | |
tree | cd5cb306c8c940fba79c41f95115c77d007d308a /chrome | |
parent | 073aabe9e48306216d979f03d6c2fc37d25d42e9 (diff) | |
download | chromium_src-ec62d3bd43fc9d581f59e383c4478001f622605f.zip chromium_src-ec62d3bd43fc9d581f59e383c4478001f622605f.tar.gz chromium_src-ec62d3bd43fc9d581f59e383c4478001f622605f.tar.bz2 |
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
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/generated_resources.grd | 3 | ||||
-rw-r--r-- | chrome/browser/cocoa/external_protocol_dialog.mm | 10 |
2 files changed, 7 insertions, 6 deletions
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 <message name="IDS_EXTERNAL_PROTOCOL_OK_BUTTON_TEXT" desc="Button in External Protocol Dialog that launches the application associated with the protocol"> Launch Application </message> + <message name="IDS_EXTERNAL_PROTOCOL_CANCEL_BUTTON_TEXT" desc="Button in External Protocol Dialog that cancels the application launch"> + Do Nothing + </message> <message name="IDS_EXTERNAL_PROTOCOL_APPLICATION_TO_LAUNCH" desc="Information about the application being launched by the external protocol"> The following application will be launched if you accept this request:\n\n <ph name="APPLICATION">$1<ex>C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe /u "%1"</ex></ph> </message> 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); } |