diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 02:12:40 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 02:12:40 +0000 |
commit | 3a54c8d27749347d4e92b3edacd335eedf7765cd (patch) | |
tree | 6dfcdf55a565afd432ae5226965e2d72cee7d2b7 | |
parent | d1282c219c49e2a8baa4326ac1b847f9c24e0c6d (diff) | |
download | chromium_src-3a54c8d27749347d4e92b3edacd335eedf7765cd.zip chromium_src-3a54c8d27749347d4e92b3edacd335eedf7765cd.tar.gz chromium_src-3a54c8d27749347d4e92b3edacd335eedf7765cd.tar.bz2 |
Revert 105998 - views: Change TextButtonBase API to string16.
BUG=68267
R=sky@chromium.org
Review URL: http://codereview.chromium.org/8262003
TBR=tfarina@chromium.org
Review URL: http://codereview.chromium.org/8329010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106001 0039d316-1c4b-4281-b951-d872f2087c98
22 files changed, 73 insertions, 67 deletions
diff --git a/chrome/browser/chromeos/login/eula_view.cc b/chrome/browser/chromeos/login/eula_view.cc index add12169..79b6f11 100644 --- a/chrome/browser/chromeos/login/eula_view.cc +++ b/chrome/browser/chromeos/login/eula_view.cc @@ -382,13 +382,14 @@ void EulaView::UpdateLocalizedStrings() { // Load other labels from resources. usage_statistics_checkbox_->SetText( - l10n_util::GetStringUTF16(IDS_EULA_CHECKBOX_ENABLE_LOGGING)); + UTF16ToWide(l10n_util::GetStringUTF16(IDS_EULA_CHECKBOX_ENABLE_LOGGING))); learn_more_link_->SetText(l10n_util::GetStringUTF16(IDS_LEARN_MORE)); system_security_settings_link_->SetText( l10n_util::GetStringUTF16(IDS_EULA_SYSTEM_SECURITY_SETTING)); - continue_button_->SetText( - l10n_util::GetStringUTF16(IDS_EULA_ACCEPT_AND_CONTINUE_BUTTON)); - back_button_->SetText(l10n_util::GetStringUTF16(IDS_EULA_BACK_BUTTON)); + continue_button_->SetText(UTF16ToWide( + l10n_util::GetStringUTF16(IDS_EULA_ACCEPT_AND_CONTINUE_BUTTON))); + back_button_->SetText( + UTF16ToWide(l10n_util::GetStringUTF16(IDS_EULA_BACK_BUTTON))); } bool EulaView::IsUsageStatsChecked() const { diff --git a/chrome/browser/chromeos/login/network_selection_view.cc b/chrome/browser/chromeos/login/network_selection_view.cc index 6150647..737cd26 100644 --- a/chrome/browser/chromeos/login/network_selection_view.cc +++ b/chrome/browser/chromeos/login/network_selection_view.cc @@ -347,10 +347,10 @@ void NetworkSelectionView::UpdateLocalizedStringsAndFonts() { SetMenuButtonFont(languages_menubutton_, base_font); languages_menubutton_->SetText( - actor_->language_switch_menu()->GetCurrentLocaleName()); + UTF16ToWide(actor_->language_switch_menu()->GetCurrentLocaleName())); SetMenuButtonFont(keyboards_menubutton_, base_font); keyboards_menubutton_->SetText( - actor_->keyboard_switch_menu()->GetCurrentKeyboardName()); + UTF16ToWide(actor_->keyboard_switch_menu()->GetCurrentKeyboardName())); welcome_label_->SetFont(welcome_label_font); welcome_label_->SetText( l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE)); diff --git a/chrome/browser/chromeos/login/new_user_view.cc b/chrome/browser/chromeos/login/new_user_view.cc index 0830eed..694db92 100644 --- a/chrome/browser/chromeos/login/new_user_view.cc +++ b/chrome/browser/chromeos/login/new_user_view.cc @@ -298,7 +298,8 @@ void NewUserView::UpdateLocalizedStringsAndFonts() { SetAndCorrectTextfieldFont(password_field_, base_font); password_field_->set_text_to_display_when_empty( l10n_util::GetStringUTF16(IDS_LOGIN_PASSWORD)); - sign_in_button_->SetText(l10n_util::GetStringUTF16(IDS_LOGIN_BUTTON)); + sign_in_button_->SetText(UTF16ToWide( + l10n_util::GetStringUTF16(IDS_LOGIN_BUTTON))); if (need_guest_link_) { guest_link_->SetFont(base_font); guest_link_->SetText( @@ -310,7 +311,8 @@ void NewUserView::UpdateLocalizedStringsAndFonts() { l10n_util::GetStringUTF16(IDS_CREATE_ACCOUNT_BUTTON)); } delegate_->ClearErrors(); - languages_menubutton_->SetText(language_switch_menu_.GetCurrentLocaleName()); + languages_menubutton_->SetText( + UTF16ToWide(language_switch_menu_.GetCurrentLocaleName())); } void NewUserView::OnLocaleChanged() { diff --git a/chrome/browser/chromeos/login/shutdown_button.cc b/chrome/browser/chromeos/login/shutdown_button.cc index 8cd5b6b..9ba532a 100644 --- a/chrome/browser/chromeos/login/shutdown_button.cc +++ b/chrome/browser/chromeos/login/shutdown_button.cc @@ -105,7 +105,7 @@ gfx::NativeCursor ShutdownButton::GetCursor(const views::MouseEvent& event) { } void ShutdownButton::OnLocaleChanged() { - SetText(l10n_util::GetStringUTF16(IDS_SHUTDOWN_BUTTON)); + SetText(UTF8ToWide(l10n_util::GetStringUTF8(IDS_SHUTDOWN_BUTTON))); if (parent()) { parent()->Layout(); parent()->SchedulePaint(); diff --git a/chrome/browser/chromeos/login/user_view.cc b/chrome/browser/chromeos/login/user_view.cc index 9133b3e..e59a7f9 100644 --- a/chrome/browser/chromeos/login/user_view.cc +++ b/chrome/browser/chromeos/login/user_view.cc @@ -116,7 +116,7 @@ class RemoveButton : public views::TextButton { public: RemoveButton(views::ButtonListener* listener, const SkBitmap& icon, - const string16& text, + const std::wstring& text, const gfx::Point& top_right) : views::TextButton(listener, std::wstring()), icon_(icon), @@ -135,7 +135,7 @@ class RemoveButton : public views::TextButton { // Overridden from View: virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE { SetIcon(icon_); - views::TextButton::SetText(string16()); + views::TextButton::SetText(std::wstring()); ClearMaxTextSize(); set_background(NULL); set_border(new views::TextButtonBorder); @@ -171,7 +171,7 @@ class RemoveButton : public views::TextButton { } } - virtual void SetText(const string16& text) OVERRIDE { + virtual void SetText(const std::wstring& text) OVERRIDE { text_ = text; } @@ -188,7 +188,7 @@ class RemoveButton : public views::TextButton { } SkBitmap icon_; - string16 text_; + std::wstring text_; gfx::Point top_right_; bool was_first_click_; @@ -265,7 +265,7 @@ void UserView::Init(bool need_background) { remove_button_ = new RemoveButton( this, *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_CLOSE_BAR_H), - l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE), + UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE)), gfx::Point(kUserImageSize - kRemoveButtonPadding, kRemoveButtonPadding)); remove_button_->SetVisible(false); AddChildView(remove_button_); @@ -314,7 +314,8 @@ void UserView::ButtonPressed(views::Button* sender, const views::Event& event) { } void UserView::OnLocaleChanged() { - remove_button_->SetText(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE)); + remove_button_->SetText( + UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE))); delegate_->OnLocaleChanged(); } diff --git a/chrome/browser/chromeos/status/clock_menu_button.cc b/chrome/browser/chromeos/status/clock_menu_button.cc index 6921a1a..ef660f0 100644 --- a/chrome/browser/chromeos/status/clock_menu_button.cc +++ b/chrome/browser/chromeos/status/clock_menu_button.cc @@ -91,10 +91,10 @@ void ClockMenuButton::UpdateText() { const bool use_24hour_clock = host_->GetProfile() ? host_->GetProfile()->GetPrefs()->GetBoolean(prefs::kUse24HourClock) : default_use_24hour_clock_; - SetText(base::TimeFormatTimeOfDayWithHourClockType( + SetText(UTF16ToWide(base::TimeFormatTimeOfDayWithHourClockType( time, use_24hour_clock ? base::k24HourClock : base::k12HourClock, - base::kDropAmPm)); + base::kDropAmPm))); SetTooltipText(base::TimeFormatFriendlyDateAndTime(time)); SetAccessibleName(base::TimeFormatFriendlyDateAndTime(time)); SchedulePaint(); diff --git a/chrome/browser/chromeos/status/input_method_menu_button.cc b/chrome/browser/chromeos/status/input_method_menu_button.cc index 1a12e02..291edc8 100644 --- a/chrome/browser/chromeos/status/input_method_menu_button.cc +++ b/chrome/browser/chromeos/status/input_method_menu_button.cc @@ -120,7 +120,7 @@ void InputMethodMenuButton::UpdateUI(const std::string& input_method_id, input_method::InputMethodUtil::IsKeyboardLayout(input_method_id) && host_->GetScreenMode() == StatusAreaHost::kBrowserMode; SetVisible(!hide_button); - SetText(name); + SetText(UTF16ToWideHack(name)); SetTooltipText(tooltip); SetAccessibleName(tooltip); diff --git a/chrome/browser/chromeos/status/memory_menu_button.cc b/chrome/browser/chromeos/status/memory_menu_button.cc index 5d96764..48989d8 100644 --- a/chrome/browser/chromeos/status/memory_menu_button.cc +++ b/chrome/browser/chromeos/status/memory_menu_button.cc @@ -78,14 +78,15 @@ void MemoryMenuButton::UpdateText() { // represents memory that has been dynamically allocated to a process. // It thus approximates heap memory usage across all processes. int anon_kb = meminfo_->active_anon + meminfo_->inactive_anon; - std::string label = base::StringPrintf("%d MB (%d)", - anon_kb / 1024, - renderer_kills_); - SetText(ASCIIToUTF16(label)); - std::string tooltip = base::StringPrintf("%d MB allocated (anonymous)\n" - "%d renderer kill(s)", - anon_kb / 1024, - renderer_kills_); + std::wstring label = base::StringPrintf(L"%d MB (%d)", + anon_kb / 1024, + renderer_kills_); + SetText(label); + std::string tooltip = base::StringPrintf( + "%d MB allocated (anonymous)\n" + "%d renderer kill(s)", + anon_kb / 1024, + renderer_kills_); SetTooltipText(ASCIIToUTF16(tooltip)); SchedulePaint(); } diff --git a/chrome/browser/chromeos/status/network_dropdown_button.cc b/chrome/browser/chromeos/status/network_dropdown_button.cc index abef11c..ac8e678 100644 --- a/chrome/browser/chromeos/status/network_dropdown_button.cc +++ b/chrome/browser/chromeos/status/network_dropdown_button.cc @@ -123,7 +123,7 @@ void NetworkDropdownButton::SetNetworkIconAndText() { string16 text; const SkBitmap bitmap = network_icon_->GetIconAndText(&text); SetIcon(bitmap); - SetText(text); + SetText(UTF16ToWide(text)); } } // namespace chromeos diff --git a/chrome/browser/chromeos/status/status_area_button.cc b/chrome/browser/chromeos/status/status_area_button.cc index d05dbfa..6e0e473 100644 --- a/chrome/browser/chromeos/status/status_area_button.cc +++ b/chrome/browser/chromeos/status/status_area_button.cc @@ -78,7 +78,7 @@ void StatusAreaButton::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { } } -void StatusAreaButton::SetText(const string16& text) { +void StatusAreaButton::SetText(const std::wstring& text) { // TextButtons normally remember the max text size, so the button's preferred // size will always be as large as the largest text ever put in it. // We clear that max text size, so we can adjust the size to fit the text. @@ -90,10 +90,11 @@ void StatusAreaButton::SetText(const string16& text) { } bool StatusAreaButton::Activate() { - if (active_) + if (active_) { return views::MenuButton::Activate(); - else + } else { return true; + } } gfx::Size StatusAreaButton::GetPreferredSize() { diff --git a/chrome/browser/chromeos/status/status_area_button.h b/chrome/browser/chromeos/status/status_area_button.h index 1aee800..2d5c9fb 100644 --- a/chrome/browser/chromeos/status/status_area_button.h +++ b/chrome/browser/chromeos/status/status_area_button.h @@ -6,7 +6,6 @@ #define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ #pragma once -#include "base/string16.h" #include "chrome/browser/chromeos/status/status_area_host.h" #include "views/controls/button/menu_button.h" #include "views/controls/menu/view_menu_delegate.h" @@ -24,7 +23,7 @@ class StatusAreaButton : public views::MenuButton { // Overrides TextButton's SetText to clear max text size before seting new // text content so that the button size would fit the new text size. - virtual void SetText(const string16& text); + virtual void SetText(const std::wstring& text); void set_use_menu_button_paint(bool use_menu_button_paint) { use_menu_button_paint_ = use_menu_button_paint; diff --git a/chrome/browser/chromeos/views/dropdown_button.cc b/chrome/browser/chromeos/views/dropdown_button.cc index f29e0c3..7d37f9e 100644 --- a/chrome/browser/chromeos/views/dropdown_button.cc +++ b/chrome/browser/chromeos/views/dropdown_button.cc @@ -4,6 +4,7 @@ #include "chrome/browser/chromeos/views/dropdown_button.h" +#include "base/utf_string_conversions.h" #include "grit/theme_resources.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/canvas_skia.h" @@ -77,8 +78,8 @@ void DropDownButton::OnPaintFocusBorder(gfx::Canvas* canvas) { height() - kFocusFrameBottomOffset); } -void DropDownButton::SetText(const string16& text) { - text_ = text; +void DropDownButton::SetText(const std::wstring& text) { + text_ = WideToUTF16Hack(text); UpdateTextSize(); } diff --git a/chrome/browser/chromeos/views/dropdown_button.h b/chrome/browser/chromeos/views/dropdown_button.h index ab33add..04c871c 100644 --- a/chrome/browser/chromeos/views/dropdown_button.h +++ b/chrome/browser/chromeos/views/dropdown_button.h @@ -27,7 +27,7 @@ class DropDownButton : public views::MenuButton { // Override SetText to set the accessible value, rather than the // accessible name, since this acts more like a combo box than a // menu. - virtual void SetText(const string16& text); + virtual void SetText(const std::wstring& text); virtual string16 GetAccessibleValue(); diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc index 2d3c10f..214790e 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc @@ -1276,7 +1276,7 @@ views::View* BookmarkBarView::CreateBookmarkButton(const BookmarkNode* node) { void BookmarkBarView::ConfigureButton(const BookmarkNode* node, views::TextButton* button) { - button->SetText(node->GetTitle()); + button->SetText(UTF16ToWide(node->GetTitle())); button->SetAccessibleName(node->GetTitle()); button->set_id(VIEW_ID_BOOKMARK_BAR_ELEMENT); // We don't always have a theme provider (ui tests, for example). diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc index 85d7b73..e0b594e 100644 --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc @@ -1139,7 +1139,8 @@ void OpaqueBrowserFrameView::UpdateAvatarInfo() { size_t index = cache.GetIndexOfProfileWithPath(profile->GetPath()); if (index != std::string::npos) { avatar_button_->SetIcon(cache.GetAvatarIconOfProfileAtIndex(index)); - avatar_button_->SetText(cache.GetNameOfProfileAtIndex(index)); + avatar_button_->SetText(UTF16ToWideHack( + cache.GetNameOfProfileAtIndex(index))); } } } diff --git a/chrome/browser/ui/views/infobars/translate_infobar_base.cc b/chrome/browser/ui/views/infobars/translate_infobar_base.cc index bfd704b..0e5b896 100644 --- a/chrome/browser/ui/views/infobars/translate_infobar_base.cc +++ b/chrome/browser/ui/views/infobars/translate_infobar_base.cc @@ -81,10 +81,10 @@ void TranslateInfoBarBase::UpdateLanguageButtonText( LanguagesMenuModel::LanguageType language_type) { DCHECK(button); TranslateInfoBarDelegate* delegate = GetDelegate(); - bool is_original = language_type == LanguagesMenuModel::ORIGINAL; - int index = is_original ? delegate->original_language_index() - : delegate->target_language_index(); - button->SetText(delegate->GetLanguageDisplayableNameAt(index)); + button->SetText(UTF16ToWideHack(delegate->GetLanguageDisplayableNameAt( + (language_type == LanguagesMenuModel::ORIGINAL) ? + delegate->original_language_index() : + delegate->target_language_index()))); // The button may have to grow to show the new text. Layout(); SchedulePaint(); diff --git a/views/controls/button/checkbox.cc b/views/controls/button/checkbox.cc index b60e802..6eb683d 100644 --- a/views/controls/button/checkbox.cc +++ b/views/controls/button/checkbox.cc @@ -5,22 +5,23 @@ #include "views/controls/button/checkbox.h" #include "base/logging.h" +#include "base/utf_string_conversions.h" #include "ui/base/accessibility/accessible_view_state.h" #include "ui/gfx/canvas.h" #include "views/controls/label.h" namespace views { -const int kCheckboxLabelSpacing = 4; - // static const char Checkbox::kViewClassName[] = "views/Checkbox"; +static const int kCheckboxLabelSpacing = 4; + //////////////////////////////////////////////////////////////////////////////// // Checkbox, public: Checkbox::Checkbox(const string16& label) - : TextButtonBase(NULL, label), + : TextButtonBase(NULL, UTF16ToWideHack(label)), checked_(false) { set_border(new TextButtonNativeThemeBorder(this)); set_focusable(true); diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc index 1d56f1d..58c0030 100644 --- a/views/controls/button/text_button.cc +++ b/views/controls/button/text_button.cc @@ -264,7 +264,8 @@ void TextButtonNativeThemeBorder::GetInsets(gfx::Insets* insets) const { //////////////////////////////////////////////////////////////////////////////// // TextButtonBase, public: -TextButtonBase::TextButtonBase(ButtonListener* listener, const string16& text) +TextButtonBase::TextButtonBase(ButtonListener* listener, + const std::wstring& text) : CustomButton(listener), alignment_(ALIGN_LEFT), font_(ResourceBundle::GetSharedInstance().GetFont( @@ -303,9 +304,9 @@ void TextButtonBase::SetIsDefault(bool is_default) { SchedulePaint(); } -void TextButtonBase::SetText(const string16& text) { - text_ = text; - SetAccessibleName(text); +void TextButtonBase::SetText(const std::wstring& text) { + text_ = WideToUTF16Hack(text); + SetAccessibleName(WideToUTF16Hack(text)); UpdateTextSize(); } @@ -652,7 +653,7 @@ gfx::NativeTheme::State TextButtonBase::GetForegroundThemeState( TextButton::TextButton(ButtonListener* listener, const std::wstring& text) - : TextButtonBase(listener, WideToUTF16Hack(text)), + : TextButtonBase(listener, text), icon_placement_(ICON_ON_LEFT), has_hover_icon_(false), has_pushed_icon_(false), diff --git a/views/controls/button/text_button.h b/views/controls/button/text_button.h index 031b59a..fedd114 100644 --- a/views/controls/button/text_button.h +++ b/views/controls/button/text_button.h @@ -8,7 +8,6 @@ #include <string> -#include "base/string16.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/font.h" @@ -140,7 +139,7 @@ class VIEWS_EXPORT TextButtonBase : public CustomButton, // Call SetText once per string in your set of possible values at button // creation time, so that it can contain the largest of them and avoid // resizing the button when the text changes. - virtual void SetText(const string16& text); + virtual void SetText(const std::wstring& text); const string16& text() const { return text_; } enum TextAlignment { @@ -216,7 +215,7 @@ class VIEWS_EXPORT TextButtonBase : public CustomButton, virtual std::string GetClassName() const OVERRIDE; protected: - TextButtonBase(ButtonListener* listener, const string16& text); + TextButtonBase(ButtonListener* listener, const std::wstring& text); // Called when enabled or disabled state changes, or the colors for those // states change. diff --git a/views/controls/message_box_view.cc b/views/controls/message_box_view.cc index 8216f29..b64952f 100644 --- a/views/controls/message_box_view.cc +++ b/views/controls/message_box_view.cc @@ -73,7 +73,7 @@ void MessageBoxView::SetCheckBoxLabel(const string16& label) { if (!checkbox_) checkbox_ = new Checkbox(label); else - checkbox_->SetText(label); + checkbox_->SetText(UTF16ToWideHack(label)); ResetLayoutManager(); } diff --git a/views/examples/button_example.cc b/views/examples/button_example.cc index 71f11f6..6f27449 100644 --- a/views/examples/button_example.cc +++ b/views/examples/button_example.cc @@ -4,7 +4,6 @@ #include "views/examples/button_example.h" -#include "base/utf_string_conversions.h" #include "grit/ui_resources.h" #include "ui/base/resource/resource_bundle.h" #include "views/controls/button/checkbox.h" @@ -35,18 +34,18 @@ void ButtonExample::CreateExampleView(views::View* container) { void ButtonExample::ButtonPressed(views::Button* sender, const views::Event& event) { - PrintStatus("Pressed! count: %d", ++count_); + PrintStatus("Pressed! count:%d", ++count_); if (event.IsControlDown()) { if (event.IsShiftDown()) { if (event.IsAltDown()) { button_->SetMultiLine(!button_->multi_line()); if (button_->multi_line()) { - button_->SetText(ASCIIToUTF16("Multi-line text\n") + - ASCIIToUTF16("is here to stay all the way!\n") + - ASCIIToUTF16("123")); + button_->SetText(L"Multi-line text\n" + L"is here to stay all the way!\n" + L"123"); } else { - button_->SetText(ASCIIToUTF16("Button")); + button_->SetText(L"Button"); } } else { switch(button_->icon_placement()) { @@ -80,14 +79,13 @@ void ButtonExample::ButtonPressed(views::Button* sender, } else if (event.IsShiftDown()) { if (event.IsAltDown()) { if (button_->text().length() < 10) { - button_->SetText( - ASCIIToUTF16("Startof") + - ASCIIToUTF16("ReallyReallyReallyReallyReallyReallyReally") + - ASCIIToUTF16("ReallyReallyReallyReallyReallyReallyReally") + - ASCIIToUTF16("ReallyReallyReallyReallyReallyReallyReally") + - ASCIIToUTF16("LongButtonText")); + button_->SetText(L"Startof" + L"ReallyReallyReallyReallyReallyReallyReally" + L"ReallyReallyReallyReallyReallyReallyReally" + L"ReallyReallyReallyReallyReallyReallyReally" + L"LongButtonText"); } else { - button_->SetText(ASCIIToUTF16("Button")); + button_->SetText(L"Button"); } } else { use_native_theme_border_ = !use_native_theme_border_; diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc index 4c571c2..5569df0 100644 --- a/views/window/dialog_client_view.cc +++ b/views/window/dialog_client_view.cc @@ -47,7 +47,7 @@ void UpdateButtonHelper(NativeTextButton* button_view, MessageBoxFlags::DialogButton button) { string16 label = delegate->GetDialogButtonLabel(button); if (!label.empty()) - button_view->SetText(label); + button_view->SetText(UTF16ToWideHack(label)); button_view->SetEnabled(delegate->IsDialogButtonEnabled(button)); button_view->SetVisible(delegate->IsDialogButtonVisible(button)); } |