summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/options
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 01:41:07 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 01:41:07 +0000
commit4743dadd60796ed4462c44ac4c8cc27673c8e6e6 (patch)
tree3a84bc5b8d1623176c257af0f4eb66f8d74a1a95 /chrome/browser/chromeos/options
parent81870ae8c94f96486435a11a490fa53e4dafb096 (diff)
downloadchromium_src-4743dadd60796ed4462c44ac4c8cc27673c8e6e6.zip
chromium_src-4743dadd60796ed4462c44ac4c8cc27673c8e6e6.tar.gz
chromium_src-4743dadd60796ed4462c44ac4c8cc27673c8e6e6.tar.bz2
Remove DOMUI and Views settings for key repeat rate and delay, change the default values instead.
BUG=chromium-os:5933 TEST=manually Review URL: http://codereview.chromium.org/3181035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57827 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/options')
-rw-r--r--chrome/browser/chromeos/options/settings_page_view.cc16
-rw-r--r--chrome/browser/chromeos/options/settings_page_view.h2
-rw-r--r--chrome/browser/chromeos/options/system_page_view.cc104
3 files changed, 3 insertions, 119 deletions
diff --git a/chrome/browser/chromeos/options/settings_page_view.cc b/chrome/browser/chromeos/options/settings_page_view.cc
index 6518cdf..84d9654 100644
--- a/chrome/browser/chromeos/options/settings_page_view.cc
+++ b/chrome/browser/chromeos/options/settings_page_view.cc
@@ -47,8 +47,7 @@ SettingsPageSection::SettingsPageSection(Profile* profile, int title_msg_id)
title_msg_id_(title_msg_id),
// Using 1000 so that it does not clash with ids defined in subclasses.
single_column_view_set_id_(1000),
- double_column_view_set_id_(1001),
- quad_column_view_set_id_(1003) {
+ double_column_view_set_id_(1001) {
}
void SettingsPageSection::InitControlLayout() {
@@ -91,19 +90,6 @@ void SettingsPageSection::InitControlLayout() {
column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
GridLayout::USE_PREF, 0, 0);
- column_set = child_layout->AddColumnSet(quad_column_view_set_id_);
- column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
- GridLayout::USE_PREF, 0, 0);
- column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
- column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
- GridLayout::USE_PREF, 0, 0);
- column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
- column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
- GridLayout::USE_PREF, 0, 0);
- column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
- column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
- GridLayout::USE_PREF, 0, 0);
-
InitContents(child_layout);
layout->AddView(contents);
}
diff --git a/chrome/browser/chromeos/options/settings_page_view.h b/chrome/browser/chromeos/options/settings_page_view.h
index 86d21e9..35e9934 100644
--- a/chrome/browser/chromeos/options/settings_page_view.h
+++ b/chrome/browser/chromeos/options/settings_page_view.h
@@ -49,7 +49,6 @@ class SettingsPageSection : public OptionsPageView {
int single_column_view_set_id() const { return single_column_view_set_id_; }
int double_column_view_set_id() const { return double_column_view_set_id_; }
- int quad_column_view_set_id() const { return quad_column_view_set_id_; }
private:
// The message id for the title of this section.
@@ -57,7 +56,6 @@ class SettingsPageSection : public OptionsPageView {
int single_column_view_set_id_;
int double_column_view_set_id_;
- int quad_column_view_set_id_;
DISALLOW_COPY_AND_ASSIGN(SettingsPageSection);
};
diff --git a/chrome/browser/chromeos/options/system_page_view.cc b/chrome/browser/chromeos/options/system_page_view.cc
index ab3b346..6eb7497 100644
--- a/chrome/browser/chromeos/options/system_page_view.cc
+++ b/chrome/browser/chromeos/options/system_page_view.cc
@@ -357,8 +357,7 @@ void TouchpadSection::NotifyPrefChanged(const std::string* pref_name) {
// TextInput section for text input settings.
class LanguageSection : public SettingsPageSection,
public views::ButtonListener,
- public views::Combobox::Listener,
- public views::SliderListener {
+ public views::Combobox::Listener {
public:
explicit LanguageSection(Profile* profile);
virtual ~LanguageSection() {}
@@ -366,7 +365,6 @@ class LanguageSection : public SettingsPageSection,
private:
enum ButtonTag {
kCustomizeLanguagesButton,
- kEnableAutoRepeatButton,
};
// Overridden from SettingsPageSection:
virtual void InitContents(GridLayout* layout);
@@ -381,23 +379,12 @@ class LanguageSection : public SettingsPageSection,
int prev_index,
int new_index);
- // Overridden from views::SliderListener.
- virtual void SliderValueChanged(views::Slider* sender);
-
IntegerPrefMember xkb_remap_search_key_pref_;
IntegerPrefMember xkb_remap_control_key_pref_;
IntegerPrefMember xkb_remap_alt_key_pref_;
views::Combobox* xkb_modifier_combobox_;
chromeos::LanguageComboboxModel<int> xkb_modifier_combobox_model_;
- BooleanPrefMember xkb_auto_repeat_pref_;
- views::Checkbox* xkb_auto_repeat_checkbox_;
-
- IntegerPrefMember xkb_auto_repeat_delay_pref_;
- views::Slider* xkb_auto_repeat_delay_slider_;
- IntegerPrefMember xkb_auto_repeat_interval_pref_;
- views::Slider* xkb_auto_repeat_interval_slider_;
-
DISALLOW_COPY_AND_ASSIGN(LanguageSection);
};
@@ -406,23 +393,13 @@ LanguageSection::LanguageSection(Profile* profile)
IDS_OPTIONS_SETTINGS_SECTION_TITLE_LANGUAGE),
xkb_modifier_combobox_(NULL),
xkb_modifier_combobox_model_(
- &language_prefs::kXkbModifierMultipleChoicePrefs),
- xkb_auto_repeat_delay_slider_(NULL),
- xkb_auto_repeat_interval_slider_(NULL) {
+ &language_prefs::kXkbModifierMultipleChoicePrefs) {
xkb_remap_search_key_pref_.Init(
prefs::kLanguageXkbRemapSearchKeyTo, profile->GetPrefs(), this);
xkb_remap_control_key_pref_.Init(
prefs::kLanguageXkbRemapControlKeyTo, profile->GetPrefs(), this);
xkb_remap_alt_key_pref_.Init(
prefs::kLanguageXkbRemapAltKeyTo, profile->GetPrefs(), this);
- xkb_auto_repeat_pref_.Init(
- prefs::kLanguageXkbAutoRepeatEnabled, profile->GetPrefs(), this);
- xkb_auto_repeat_delay_pref_.Init(
- language_prefs::kXkbAutoRepeatDelayPref.pref_name,
- profile->GetPrefs(), this);
- xkb_auto_repeat_interval_pref_.Init(
- language_prefs::kXkbAutoRepeatIntervalPref.pref_name,
- profile->GetPrefs(), this);
}
void LanguageSection::InitContents(GridLayout* layout) {
@@ -436,26 +413,6 @@ void LanguageSection::InitContents(GridLayout* layout) {
xkb_modifier_combobox_ = new views::Combobox(&xkb_modifier_combobox_model_);
xkb_modifier_combobox_->set_listener(this);
- xkb_auto_repeat_checkbox_ = new views::Checkbox(l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_ENABLED));
- xkb_auto_repeat_checkbox_->set_tag(kEnableAutoRepeatButton);
- xkb_auto_repeat_checkbox_->set_listener(this);
-
- xkb_auto_repeat_delay_slider_ = new views::Slider(
- language_prefs::kXkbAutoRepeatDelayPref.min_pref_value,
- language_prefs::kXkbAutoRepeatDelayPref.max_pref_value,
- 1,
- static_cast<views::Slider::StyleFlags>(
- views::Slider::STYLE_UPDATE_ON_RELEASE),
- this);
- xkb_auto_repeat_interval_slider_ = new views::Slider(
- language_prefs::kXkbAutoRepeatIntervalPref.min_pref_value,
- language_prefs::kXkbAutoRepeatIntervalPref.max_pref_value,
- 1,
- static_cast<views::Slider::StyleFlags>(
- views::Slider::STYLE_UPDATE_ON_RELEASE),
- this);
-
// Initialize the combobox to what's saved in user preferences. Otherwise,
// ItemChanged() will be called with |new_index| == 0.
NotifyPrefChanged(NULL);
@@ -463,38 +420,6 @@ void LanguageSection::InitContents(GridLayout* layout) {
layout->AddView(customize_languages_button, 1, 1,
GridLayout::LEADING, GridLayout::CENTER);
layout->AddView(xkb_modifier_combobox_);
- layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
- layout->StartRow(0, single_column_view_set_id());
- layout->AddView(xkb_auto_repeat_checkbox_);
-
- layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
- layout->StartRow(0, quad_column_view_set_id());
- layout->AddView(new views::Label(
- l10n_util::GetString(
- language_prefs::kXkbAutoRepeatDelayPref.message_id)),
- 1, 1, GridLayout::LEADING, GridLayout::CENTER);
- layout->AddView(new views::Label(
- l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY_SHORT)));
- layout->AddView(xkb_auto_repeat_delay_slider_);
- layout->AddView(new views::Label(
- l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY_LONG)));
-
- layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
- layout->StartRow(0, quad_column_view_set_id());
- layout->AddView(new views::Label(
- l10n_util::GetString(
- language_prefs::kXkbAutoRepeatIntervalPref.message_id)),
- 1, 1, GridLayout::LEADING, GridLayout::CENTER);
- layout->AddView(new views::Label(
- l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED_FAST)));
- layout->AddView(xkb_auto_repeat_interval_slider_);
- layout->AddView(new views::Label(
- l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED_SLOW)));
-
layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing);
}
@@ -502,9 +427,6 @@ void LanguageSection::ButtonPressed(
views::Button* sender, const views::Event& event) {
if (sender->tag() == kCustomizeLanguagesButton) {
LanguageConfigView::Show(profile(), GetOptionsViewParent());
- } else if (sender->tag() == kEnableAutoRepeatButton) {
- const bool enabled = xkb_auto_repeat_checkbox_->checked();
- xkb_auto_repeat_pref_.SetValue(enabled);
}
}
@@ -534,14 +456,6 @@ void LanguageSection::ItemChanged(views::Combobox* sender,
}
}
-void LanguageSection::SliderValueChanged(views::Slider* sender) {
- if (xkb_auto_repeat_delay_slider_ == sender) {
- xkb_auto_repeat_delay_pref_.SetValue(sender->value());
- } else if (xkb_auto_repeat_interval_slider_ == sender) {
- xkb_auto_repeat_interval_pref_.SetValue(sender->value());
- }
-}
-
void LanguageSection::NotifyPrefChanged(const std::string* pref_name) {
if (!pref_name || (*pref_name == prefs::kLanguageXkbRemapSearchKeyTo ||
*pref_name == prefs::kLanguageXkbRemapControlKeyTo ||
@@ -567,20 +481,6 @@ void LanguageSection::NotifyPrefChanged(const std::string* pref_name) {
xkb_modifier_combobox_->SetSelectedItem(language_prefs::kNoRemap);
}
}
- if (!pref_name || *pref_name == prefs::kLanguageXkbAutoRepeatEnabled) {
- const bool enabled = xkb_auto_repeat_pref_.GetValue();
- xkb_auto_repeat_checkbox_->SetChecked(enabled);
- }
- if (!pref_name ||
- *pref_name == language_prefs::kXkbAutoRepeatDelayPref.pref_name) {
- const int delay_value = xkb_auto_repeat_delay_pref_.GetValue();
- xkb_auto_repeat_delay_slider_->SetValue(delay_value);
- }
- if (!pref_name ||
- *pref_name == language_prefs::kXkbAutoRepeatIntervalPref.pref_name) {
- const int interval_value = xkb_auto_repeat_interval_pref_.GetValue();
- xkb_auto_repeat_interval_slider_->SetValue(interval_value);
- }
}
///////////////////////////////////////////////////////////////////////////////