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

Unified Diff: chrome/browser/ui/views/simple_message_box_views.cc

Issue 10392177: views: Fix the button's label of the question message box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert the condition in GetDialogButtons - simplifies. Created 8 years, 7 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/ui/views/simple_message_box_views.cc
diff --git a/chrome/browser/ui/views/simple_message_box_views.cc b/chrome/browser/ui/views/simple_message_box_views.cc
index 18dd80aece719c05dae7cd231f128aa97d8aa69d..141e7a13a32093c48f1505f55ff1b38e356fd6a9 100644
--- a/chrome/browser/ui/views/simple_message_box_views.cc
+++ b/chrome/browser/ui/views/simple_message_box_views.cc
@@ -154,16 +154,19 @@ SimpleMessageBoxViews::~SimpleMessageBoxViews() {
}
int SimpleMessageBoxViews::GetDialogButtons() const {
- if (dialog_type_ == DIALOG_TYPE_INFORMATION ||
- dialog_type_ == DIALOG_TYPE_WARNING)
- return ui::DIALOG_BUTTON_OK;
- return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL;
+ if (dialog_type_ == DIALOG_TYPE_QUESTION)
+ return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL;
+ return ui::DIALOG_BUTTON_OK;
}
string16 SimpleMessageBoxViews::GetDialogButtonLabel(
ui::DialogButton button) const {
- return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ?
- IDS_OK : IDS_CLOSE);
+ if (dialog_type_ == DIALOG_TYPE_QUESTION) {
+ return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ?
+ IDS_CONFIRM_MESSAGEBOX_YES_BUTTON_LABEL :
tfarina 2012/05/19 14:05:01 we could have an IDS_YES and IDS_NO.
+ IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL);
+ }
+ return l10n_util::GetStringUTF16(IDS_OK);
}
bool SimpleMessageBoxViews::Cancel() {
« 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