diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-04 22:55:36 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-04 22:55:36 +0000 |
commit | 5e120024c2c6a5fd30b082263ccf462901c11bca (patch) | |
tree | bab88f5e6dfec11c5c67b6443b5c90846c712c7f /chrome/browser/protector | |
parent | 920fb4b9d08547fbe25bb2544dfb47157db9fea1 (diff) | |
download | chromium_src-5e120024c2c6a5fd30b082263ccf462901c11bca.zip chromium_src-5e120024c2c6a5fd30b082263ccf462901c11bca.tar.gz chromium_src-5e120024c2c6a5fd30b082263ccf462901c11bca.tar.bz2 |
Fix ordering of buttons in protector search bubble on Mac
The root problem was that the error bubble on Windows and GTK were placing the accept and cancel button in the wrong order.
Fix was to correct the error bubble code and flip the protector labels.
Windows: http://imgur.com/RBD5h,JEekA,F6Due#0
Cocoa: http://imgur.com/RBD5h,JEekA,F6Due#1
GTK: http://imgur.com/RBD5h,JEekA,F6Due#2
BUG=100854
TEST=
Review URL: http://codereview.chromium.org/8458001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108735 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/protector')
-rw-r--r-- | chrome/browser/protector/settings_change_global_error.cc | 20 | ||||
-rw-r--r-- | chrome/browser/protector/settings_change_global_error.h | 1 |
2 files changed, 8 insertions, 13 deletions
diff --git a/chrome/browser/protector/settings_change_global_error.cc b/chrome/browser/protector/settings_change_global_error.cc index 037c095..9909cb3 100644 --- a/chrome/browser/protector/settings_change_global_error.cc +++ b/chrome/browser/protector/settings_change_global_error.cc @@ -134,12 +134,6 @@ string16 SettingsChangeGlobalError::GetBubbleViewMessage() { string16 SettingsChangeGlobalError::GetBubbleViewAcceptButtonLabel() { SettingChange* change = changes_.front(); - return l10n_util::GetStringFUTF16(kBubbleChangeSettingIDs[change->type()], - change->GetNewSetting()); -} - -string16 SettingsChangeGlobalError::GetBubbleViewCancelButtonLabel() { - SettingChange* change = changes_.front(); string16 old_setting = change->GetOldSetting(); if (old_setting.empty()) { return l10n_util::GetStringUTF16(IDS_SETTINGS_CHANGE_OPEN_SETTINGS); @@ -150,22 +144,24 @@ string16 SettingsChangeGlobalError::GetBubbleViewCancelButtonLabel() { } } -bool SettingsChangeGlobalError::IsAcceptButtonDefault() { - return false; +string16 SettingsChangeGlobalError::GetBubbleViewCancelButtonLabel() { + SettingChange* change = changes_.front(); + return l10n_util::GetStringFUTF16(kBubbleChangeSettingIDs[change->type()], + change->GetNewSetting()); } void SettingsChangeGlobalError::BubbleViewAcceptButtonPressed() { closed_by_button_ = true; DCHECK(delegate_); - VLOG(1) << "Apply changes"; - delegate_->OnApplyChanges(); + VLOG(1) << "Discard changes"; + delegate_->OnDiscardChanges(); } void SettingsChangeGlobalError::BubbleViewCancelButtonPressed() { closed_by_button_ = true; DCHECK(delegate_); - VLOG(1) << "Discard changes"; - delegate_->OnDiscardChanges(); + VLOG(1) << "Apply changes"; + delegate_->OnApplyChanges(); } void SettingsChangeGlobalError::RemoveFromProfile() { diff --git a/chrome/browser/protector/settings_change_global_error.h b/chrome/browser/protector/settings_change_global_error.h index 6694fe8..ea41022 100644 --- a/chrome/browser/protector/settings_change_global_error.h +++ b/chrome/browser/protector/settings_change_global_error.h @@ -50,7 +50,6 @@ class SettingsChangeGlobalError : public GlobalError { virtual string16 GetBubbleViewMessage() OVERRIDE; virtual string16 GetBubbleViewAcceptButtonLabel() OVERRIDE; virtual string16 GetBubbleViewCancelButtonLabel() OVERRIDE; - virtual bool IsAcceptButtonDefault() OVERRIDE; virtual void BubbleViewDidClose() OVERRIDE; virtual void BubbleViewAcceptButtonPressed() OVERRIDE; virtual void BubbleViewCancelButtonPressed() OVERRIDE; |