Commit 85938cb0 authored by tfarina@chromium.org's avatar tfarina@chromium.org

views: Fix the button's label of the question message box.

They should read Yes/No, instead of OK/Close.

BUG=128861
TEST=to reproduce this, have more than 15 bookmarks in a folder in the bookmark
bar, click on "Open All Bookmarks", you should see a confirmation dialog with
[Yes] [No] buttons.
R=pkasting@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10392177

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138121 0039d316-1c4b-4281-b951-d872f2087c98
parent afeb5995
......@@ -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 :
IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL);
}
return l10n_util::GetStringUTF16(IDS_OK);
}
bool SimpleMessageBoxViews::Cancel() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment