summaryrefslogtreecommitdiffstats
path: root/src/Config.cc
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2010-04-15 15:24:26 +0800
committerPeng Huang <shawn.p.huang@gmail.com>2010-04-15 15:25:26 +0800
commit9e5ecb8182be4e5a7c91cb92e9c5c64ed63fe8a2 (patch)
treed83120974e4b036428ea40ac9b7de3a00568159f /src/Config.cc
parent547f5f2edf23027731a3e9f13f2de60a32224c9f (diff)
downloadibus-libpinyin-9e5ecb8182be4e5a7c91cb92e9c5c64ed63fe8a2.tar.gz
ibus-libpinyin-9e5ecb8182be4e5a7c91cb92e9c5c64ed63fe8a2.tar.xz
ibus-libpinyin-9e5ecb8182be4e5a7c91cb92e9c5c64ed63fe8a2.zip
Add special phrases in setup ui
Diffstat (limited to 'src/Config.cc')
-rw-r--r--src/Config.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Config.cc b/src/Config.cc
index c328d8e..e01d40f 100644
--- a/src/Config.cc
+++ b/src/Config.cc
@@ -23,6 +23,7 @@ gboolean Config::m_init_full = FALSE;
gboolean Config::m_init_full_punct = TRUE;
gboolean Config::m_init_simp_chinese = TRUE;
gboolean Config::m_trad_candidate = FALSE;
+gboolean Config::m_special_phrases = TRUE;
static const StaticString engine_pinyin ("engine/Pinyin");
static const StaticString correct_pinyin ("CorrectPinyin");
@@ -44,6 +45,7 @@ static const StaticString init_full ("InitFull");
static const StaticString init_full_punct ("InitFullPunct");
static const StaticString init_simp_chinese ("InitSimplifiedChinese");
static const StaticString trad_candidate ("TradCandidate");
+static const StaticString special_phrases ("SpecialPhrases");
static const struct {
StaticString name;
@@ -106,6 +108,7 @@ Config::readDefaultValues (void)
m_init_simp_chinese = read (engine_pinyin, init_simp_chinese, true);
m_trad_candidate = read (engine_pinyin, trad_candidate, false);
+ m_special_phrases = read (engine_pinyin, special_phrases, true);
/* others */
m_orientation = read (engine_pinyin, PY::orientation, 0);
@@ -216,6 +219,8 @@ Config::valueChangedCallback (IBusConfig *config,
m_init_simp_chinese = normalizeGValue (value, true);
else if (trad_candidate == name)
m_trad_candidate = normalizeGValue (value, false);
+ else if (special_phrases == name)
+ m_special_phrases = normalizeGValue (value, true);
/* lookup table page size */
else if (PY::orientation == name) {
m_orientation = normalizeGValue (value, 0);