| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/edit_search_engine_dialog.h" | 5 #include "chrome/browser/ui/views/edit_search_engine_dialog.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/search_engines/template_url.h" | 10 #include "chrome/browser/search_engines/template_url.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 219 |
| 220 views::Label* description_label = new views::Label(description); | 220 views::Label* description_label = new views::Label(description); |
| 221 description_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 221 description_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 222 layout->AddView(description_label); | 222 layout->AddView(description_label); |
| 223 | 223 |
| 224 layout->AddPaddingRow(0, related_y); | 224 layout->AddPaddingRow(0, related_y); |
| 225 } | 225 } |
| 226 | 226 |
| 227 views::Label* EditSearchEngineDialog::CreateLabel(int message_id) { | 227 views::Label* EditSearchEngineDialog::CreateLabel(int message_id) { |
| 228 views::Label* label = | 228 views::Label* label = |
| 229 new views::Label(l10n_util::GetStringUTF16(message_id)); | 229 new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(message_id))); |
| 230 label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 230 label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 231 return label; | 231 return label; |
| 232 } | 232 } |
| 233 | 233 |
| 234 Textfield* EditSearchEngineDialog::CreateTextfield(const std::wstring& text, | 234 Textfield* EditSearchEngineDialog::CreateTextfield(const std::wstring& text, |
| 235 bool lowercase) { | 235 bool lowercase) { |
| 236 Textfield* text_field = new Textfield( | 236 Textfield* text_field = new Textfield( |
| 237 lowercase ? Textfield::STYLE_LOWERCASE : Textfield::STYLE_DEFAULT); | 237 lowercase ? Textfield::STYLE_LOWERCASE : Textfield::STYLE_DEFAULT); |
| 238 text_field->SetText(text); | 238 text_field->SetText(text); |
| 239 text_field->SetController(this); | 239 text_field->SetController(this); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 259 image_view->SetImage( | 259 image_view->SetImage( |
| 260 ResourceBundle::GetSharedInstance().GetBitmapNamed( | 260 ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| 261 IDR_INPUT_GOOD)); | 261 IDR_INPUT_GOOD)); |
| 262 } else { | 262 } else { |
| 263 image_view->SetTooltipText(l10n_util::GetStringUTF16(invalid_message_id)); | 263 image_view->SetTooltipText(l10n_util::GetStringUTF16(invalid_message_id)); |
| 264 image_view->SetImage( | 264 image_view->SetImage( |
| 265 ResourceBundle::GetSharedInstance().GetBitmapNamed( | 265 ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| 266 IDR_INPUT_ALERT)); | 266 IDR_INPUT_ALERT)); |
| 267 } | 267 } |
| 268 } | 268 } |
| OLD | NEW |