From a13ace8a4b349b878479474915836399cae67599 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 29 Jul 2015 14:01:08 +0800 Subject: add space show candidates option --- src/ZYZConfig.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ZYZConfig.cc') diff --git a/src/ZYZConfig.cc b/src/ZYZConfig.cc index ecf15dc..17a6a34 100644 --- a/src/ZYZConfig.cc +++ b/src/ZYZConfig.cc @@ -35,6 +35,7 @@ const gchar * const CONFIG_INIT_FULL_ENGLISH = "fullhalfenglish"; const gchar * const CONFIG_INIT_FULL_PUNCT = "fullhalfpunct"; const gchar * const CONFIG_INIT_TRAD_CHINESE = "traditionalchinese"; const gchar * const CONFIG_ALWAYS_INPUT_NUMBERS = "alwaysinputnum"; +const gchar * const CONFIG_SPACE_SHOW_CANDIDATES = "spaceshowcandidates"; const gchar * const CONFIG_KEYBOARD_LAYOUT = "keyboardlayout"; const gchar * const CONFIG_CANDIDATE_KEYS = "candidatekeys"; @@ -94,6 +95,7 @@ ZhuyinConfig::initDefaultValues (void) m_init_trad_chinese = TRUE; m_always_input_numbers = FALSE; + m_space_show_candidates = FALSE; m_candidate_keys = "1234567890"; @@ -185,6 +187,7 @@ ZhuyinConfig::readDefaultValues (void) m_init_trad_chinese = read (CONFIG_INIT_TRAD_CHINESE, true); m_always_input_numbers = read (CONFIG_ALWAYS_INPUT_NUMBERS, false); + m_space_show_candidates = read (CONFIG_SPACE_SHOW_CANDIDATES, false); gint layout = read (CONFIG_KEYBOARD_LAYOUT, 0); m_keyboard_layout = CHEWING_DEFAULT; @@ -241,6 +244,8 @@ ZhuyinConfig::valueChanged (const std::string §ion, m_init_trad_chinese = normalizeGVariant (value, true); else if (CONFIG_ALWAYS_INPUT_NUMBERS == name) m_always_input_numbers = normalizeGVariant (value, false); + else if (CONFIG_SPACE_SHOW_CANDIDATES == name) + m_space_show_candidates = normalizeGVariant (value, false); else if (CONFIG_KEYBOARD_LAYOUT == name) { gint layout = normalizeGVariant (value, 0); m_keyboard_layout = CHEWING_DEFAULT; -- cgit