OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/login/new_user_view.h" | 5 #include "chrome/browser/chromeos/login/new_user_view.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 if (sign_in_button_order_ < 0) { | 270 if (sign_in_button_order_ < 0) { |
271 sign_in_button_order_ = GetChildViewCount(); | 271 sign_in_button_order_ = GetChildViewCount(); |
272 } | 272 } |
273 views::View::AddChildView(sign_in_button_order_, view); | 273 views::View::AddChildView(sign_in_button_order_, view); |
274 } else { | 274 } else { |
275 views::View::AddChildView(view); | 275 views::View::AddChildView(view); |
276 } | 276 } |
277 } | 277 } |
278 | 278 |
279 void NewUserView::UpdateLocalizedStrings() { | 279 void NewUserView::UpdateLocalizedStrings() { |
280 title_label_->SetText(l10n_util::GetString(IDS_LOGIN_TITLE)); | 280 title_label_->SetText(UTF16ToWide( |
281 title_hint_label_->SetText(l10n_util::GetString(IDS_LOGIN_TITLE_HINT)); | 281 l10n_util::GetStringUTF16(IDS_LOGIN_TITLE))); |
| 282 title_hint_label_->SetText(UTF16ToWide( |
| 283 l10n_util::GetStringUTF16(IDS_LOGIN_TITLE_HINT))); |
282 username_field_->set_text_to_display_when_empty( | 284 username_field_->set_text_to_display_when_empty( |
283 l10n_util::GetStringUTF16(IDS_LOGIN_USERNAME)); | 285 l10n_util::GetStringUTF16(IDS_LOGIN_USERNAME)); |
284 password_field_->set_text_to_display_when_empty( | 286 password_field_->set_text_to_display_when_empty( |
285 l10n_util::GetStringUTF16(IDS_LOGIN_PASSWORD)); | 287 l10n_util::GetStringUTF16(IDS_LOGIN_PASSWORD)); |
286 sign_in_button_->SetLabel(l10n_util::GetString(IDS_LOGIN_BUTTON)); | 288 sign_in_button_->SetLabel(UTF16ToWide( |
| 289 l10n_util::GetStringUTF16(IDS_LOGIN_BUTTON))); |
287 if (need_create_account_) { | 290 if (need_create_account_) { |
288 create_account_link_->SetText( | 291 create_account_link_->SetText( |
289 l10n_util::GetString(IDS_CREATE_ACCOUNT_BUTTON)); | 292 UTF16ToWide(l10n_util::GetStringUTF16(IDS_CREATE_ACCOUNT_BUTTON))); |
290 } | 293 } |
291 if (need_guest_link_) { | 294 if (need_guest_link_) { |
292 guest_link_->SetText( | 295 guest_link_->SetText(UTF16ToWide( |
293 l10n_util::GetString(IDS_BROWSE_WITHOUT_SIGNING_IN_BUTTON)); | 296 l10n_util::GetStringUTF16(IDS_BROWSE_WITHOUT_SIGNING_IN_BUTTON))); |
294 } | 297 } |
295 delegate_->ClearErrors(); | 298 delegate_->ClearErrors(); |
296 languages_menubutton_->SetText( | 299 languages_menubutton_->SetText( |
297 UTF16ToWide(language_switch_menu_.GetCurrentLocaleName())); | 300 UTF16ToWide(language_switch_menu_.GetCurrentLocaleName())); |
298 } | 301 } |
299 | 302 |
300 void NewUserView::OnLocaleChanged() { | 303 void NewUserView::OnLocaleChanged() { |
301 RecreatePeculiarControls(); | 304 RecreatePeculiarControls(); |
302 UpdateLocalizedStrings(); | 305 UpdateLocalizedStrings(); |
303 AddChildView(sign_in_button_); | 306 AddChildView(sign_in_button_); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 | 571 |
569 void NewUserView::InitLink(views::Link** link) { | 572 void NewUserView::InitLink(views::Link** link) { |
570 *link = new views::Link(std::wstring()); | 573 *link = new views::Link(std::wstring()); |
571 (*link)->SetController(this); | 574 (*link)->SetController(this); |
572 (*link)->SetNormalColor(login::kLinkColor); | 575 (*link)->SetNormalColor(login::kLinkColor); |
573 (*link)->SetHighlightedColor(login::kLinkColor); | 576 (*link)->SetHighlightedColor(login::kLinkColor); |
574 AddChildView(*link); | 577 AddChildView(*link); |
575 } | 578 } |
576 | 579 |
577 } // namespace chromeos | 580 } // namespace chromeos |
OLD | NEW |