From f3c0b69355f68f2bcd00f48211489c17d912f85d Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 9 Aug 2012 13:07:36 +0800 Subject: add m_dictionaries --- src/PYConfig.cc | 2 ++ src/PYPConfig.cc | 7 +++++++ 2 files changed, 9 insertions(+) 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)) -- cgit v1.2.1