diff options
-rw-r--r-- | chrome/app/generated_resources.grd | 4 | ||||
-rw-r--r-- | chrome/browser/chromeos/options/system_page_view.cc | 46 |
2 files changed, 24 insertions, 26 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 9443b81..32b5b04 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -6889,8 +6889,8 @@ Keep your key file in a safe place. You will need it to create new versions of y <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_PASSWORD"> Network Password </message> - <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_TEXT_INPUT"> - Text Input + <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_LANGUAGE"> + Language </message> <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_WIFI_CONFIG"> Wireless diff --git a/chrome/browser/chromeos/options/system_page_view.cc b/chrome/browser/chromeos/options/system_page_view.cc index 32db4a4..bce4338 100644 --- a/chrome/browser/chromeos/options/system_page_view.cc +++ b/chrome/browser/chromeos/options/system_page_view.cc @@ -308,18 +308,16 @@ void TouchpadSection::NotifyPrefChanged(const std::wstring* pref_name) { } //////////////////////////////////////////////////////////////////////////////// -// TextInputSection +// LanguageSection // TextInput section for text input settings. -class TextInputSection : public SettingsPageSection, - public views::ButtonListener { +class LanguageSection : public SettingsPageSection, + public views::ButtonListener { public: - explicit TextInputSection(Profile* profile); - virtual ~TextInputSection() {} + explicit LanguageSection(Profile* profile); + virtual ~LanguageSection() {} private: - views::NativeButton* customize_languages_button_; - // Overridden from SettingsPageSection: virtual void InitContents(GridLayout* layout); @@ -327,17 +325,27 @@ class TextInputSection : public SettingsPageSection, virtual void ButtonPressed(views::Button* sender, const views::Event& event); - DISALLOW_COPY_AND_ASSIGN(TextInputSection); + views::NativeButton* customize_languages_button_; + + DISALLOW_COPY_AND_ASSIGN(LanguageSection); }; -// TODO(satorux): Should change the class name as well as the section -// title. "Text Input" doesn't seem to be a good section name. -TextInputSection::TextInputSection(Profile* profile) +LanguageSection::LanguageSection(Profile* profile) : SettingsPageSection(profile, - IDS_OPTIONS_SETTINGS_SECTION_TITLE_TEXT_INPUT) { + IDS_OPTIONS_SETTINGS_SECTION_TITLE_LANGUAGE) { +} + +void LanguageSection::InitContents(GridLayout* layout) { + // Add the customize button. + layout->StartRow(0, single_column_view_set_id()); + customize_languages_button_ = new views::NativeButton( + this, + l10n_util::GetString(IDS_OPTIONS_SETTINGS_LANGUAGES_CUSTOMIZE)); + layout->AddView(customize_languages_button_, 1, 1, + GridLayout::LEADING, GridLayout::CENTER); } -void TextInputSection::ButtonPressed( +void LanguageSection::ButtonPressed( views::Button* sender, const views::Event& event) { if (sender == customize_languages_button_) { views::Window* window = views::Window::CreateChromeWindow( @@ -349,16 +357,6 @@ void TextInputSection::ButtonPressed( } } -void TextInputSection::InitContents(GridLayout* layout) { - // Add the customize button. - layout->StartRow(0, single_column_view_set_id()); - customize_languages_button_ = new views::NativeButton( - this, - l10n_util::GetString(IDS_OPTIONS_SETTINGS_LANGUAGES_CUSTOMIZE)); - layout->AddView(customize_languages_button_, 1, 1, - GridLayout::LEADING, GridLayout::CENTER); -} - //////////////////////////////////////////////////////////////////////////////// // SystemPageView @@ -381,7 +379,7 @@ void SystemPageView::InitControlLayout() { layout->AddView(new TouchpadSection(profile())); layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); layout->StartRow(0, single_column_view_set_id); - layout->AddView(new TextInputSection(profile())); + layout->AddView(new LanguageSection(profile())); layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); } |