summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/preferences.cc
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-03 03:28:21 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-03 03:28:21 +0000
commit15c5308c0936da6a3817fd36df2d29f1aa2ced5e (patch)
treeab98a49b1c1df48821abb891d5738c3ccd52e026 /chrome/browser/chromeos/preferences.cc
parent068c30e965e6d1f04e9bb999402434719bc41275 (diff)
downloadchromium_src-15c5308c0936da6a3817fd36df2d29f1aa2ced5e.zip
chromium_src-15c5308c0936da6a3817fd36df2d29f1aa2ced5e.tar.gz
chromium_src-15c5308c0936da6a3817fd36df2d29f1aa2ced5e.tar.bz2
Add Chewing integer preferences
BUG=chromium-os:2624 TEST=Open the IME settings window. Add Traditional Chinese. Open the options dialog, and check that the integer prefs are there Review URL: http://codereview.chromium.org/2457001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/preferences.cc')
-rw-r--r--chrome/browser/chromeos/preferences.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
index ea45ae4..7314803 100644
--- a/chrome/browser/chromeos/preferences.cc
+++ b/chrome/browser/chromeos/preferences.cc
@@ -40,6 +40,10 @@ void Preferences::RegisterUserPrefs(PrefService* prefs) {
kChewingMultipleChoicePrefs[i].pref_name,
kChewingMultipleChoicePrefs[i].default_pref_value);
}
+ for (size_t i = 0; i < kNumChewingIntegerPrefs; ++i) {
+ prefs->RegisterIntegerPref(kChewingIntegerPrefs[i].pref_name,
+ kChewingIntegerPrefs[i].default_pref_value);
+ }
prefs->RegisterStringPref(prefs::kLanguageHangulKeyboard,
kHangulKeyboardNameIDPairs[0].keyboard_id);
for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
@@ -76,6 +80,10 @@ void Preferences::Init(PrefService* prefs) {
language_chewing_multiple_choice_prefs_[i].Init(
kChewingMultipleChoicePrefs[i].pref_name, prefs, this);
}
+ for (size_t i = 0; i < kNumChewingIntegerPrefs; ++i) {
+ language_chewing_integer_prefs_[i].Init(
+ kChewingIntegerPrefs[i].pref_name, prefs, this);
+ }
language_hangul_keyboard_.Init(prefs::kLanguageHangulKeyboard, prefs, this);
for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
language_pinyin_boolean_prefs_[i].Init(
@@ -154,6 +162,13 @@ void Preferences::NotifyPrefChanged(const std::wstring* pref_name) {
language_chewing_multiple_choice_prefs_[i].GetValue());
}
}
+ for (size_t i = 0; i < kNumChewingIntegerPrefs; ++i) {
+ if (!pref_name || *pref_name == kChewingIntegerPrefs[i].pref_name) {
+ SetLanguageConfigInteger(kChewingSectionName,
+ kChewingIntegerPrefs[i].ibus_config_name,
+ language_chewing_integer_prefs_[i].GetValue());
+ }
+ }
if (!pref_name || *pref_name == prefs::kLanguageHangulKeyboard) {
SetLanguageConfigString(kHangulSectionName, kHangulKeyboardConfigName,
language_hangul_keyboard_.GetValue());