diff options
author | Peng Wu <alexepico@gmail.com> | 2012-08-09 13:07:36 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-08-09 13:07:36 +0800 |
commit | f3c0b69355f68f2bcd00f48211489c17d912f85d (patch) | |
tree | e9474926a5281ce9ada1ed852e2dfd3eb991d494 | |
parent | 451b86fca949ee74cfec8e3494a096ea6fa7519a (diff) | |
download | ibus-libpinyin-f3c0b69355f68f2bcd00f48211489c17d912f85d.tar.gz ibus-libpinyin-f3c0b69355f68f2bcd00f48211489c17d912f85d.tar.xz ibus-libpinyin-f3c0b69355f68f2bcd00f48211489c17d912f85d.zip |
add m_dictionaries
-rw-r--r-- | src/PYConfig.cc | 2 | ||||
-rw-r--r-- | src/PYPConfig.cc | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/PYConfig.cc b/src/PYConfig.cc index 5d3145b..9db78da 100644 --- a/src/PYConfig.cc +++ b/src/PYConfig.cc @@ -60,6 +60,8 @@ Config::initDefaultValues (void) m_init_full_punct = TRUE; m_init_simp_chinese = TRUE; m_special_phrases = TRUE; + + m_dictionaries = "2"; } diff --git a/src/PYPConfig.cc b/src/PYPConfig.cc index 200b8fe..4c366aa 100644 --- a/src/PYPConfig.cc +++ b/src/PYPConfig.cc @@ -42,6 +42,7 @@ const gchar * const CONFIG_INIT_FULL = "InitFull"; const gchar * const CONFIG_INIT_FULL_PUNCT = "InitFullPunct"; const gchar * const CONFIG_INIT_SIMP_CHINESE = "InitSimplifiedChinese"; const gchar * const CONFIG_SPECIAL_PHRASES = "SpecialPhrases"; +const gchar * const CONFIG_DICTIONARIES = "Dictionaries"; const gchar * const CONFIG_BOPOMOFO_KEYBOARD_MAPPING = "BopomofoKeyboardMapping"; const gchar * const CONFIG_SELECT_KEYS = "SelectKeys"; const gchar * const CONFIG_GUIDE_KEY = "GuideKey"; @@ -94,6 +95,8 @@ LibPinyinConfig::initDefaultValues (void) m_init_full_punct = TRUE; m_init_simp_chinese = TRUE; m_special_phrases = TRUE; + + m_dictionaries = "2"; } static const struct { @@ -149,6 +152,7 @@ LibPinyinConfig::readDefaultValues (void) m_page_size = 5; g_warn_if_reached (); } + m_dictionaries = read (CONFIG_DICTIONARIES, "2"); /* fuzzy pinyin */ if (read (CONFIG_FUZZY_PINYIN, false)) @@ -218,6 +222,9 @@ LibPinyinConfig::valueChanged (const std::string §ion, g_warn_if_reached (); } } + else if (CONFIG_DICTIONARIES == name) { + m_dictionaries = normalizeGVariant (value, "2"); + } /* fuzzy pinyin */ else if (CONFIG_FUZZY_PINYIN == name) { if (normalizeGVariant (value, false)) |