summaryrefslogtreecommitdiffstats
path: root/src/ZYZConfig.cc
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-08-04 14:17:01 +0800
committerPeng Wu <alexepico@gmail.com>2015-08-04 14:17:01 +0800
commit5a9fa844efd42522eb5739f3ba12913ab80437a5 (patch)
tree5609f983fcb20b23c1ae16c5fdce6d4c827b825d /src/ZYZConfig.cc
parent551ef42ffa74793b69f8ffc1c338e25674abc6de (diff)
downloadibus-libzhuyin-5a9fa844efd42522eb5739f3ba12913ab80437a5.tar.gz
ibus-libzhuyin-5a9fa844efd42522eb5739f3ba12913ab80437a5.tar.xz
ibus-libzhuyin-5a9fa844efd42522eb5739f3ba12913ab80437a5.zip
add candidates after cursor option
Diffstat (limited to 'src/ZYZConfig.cc')
-rw-r--r--src/ZYZConfig.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ZYZConfig.cc b/src/ZYZConfig.cc
index 17a6a34..db785e6 100644
--- a/src/ZYZConfig.cc
+++ b/src/ZYZConfig.cc
@@ -36,6 +36,7 @@ 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_CANDIDATES_AFTER_CURSOR = "candidatesaftercursor";
const gchar * const CONFIG_KEYBOARD_LAYOUT = "keyboardlayout";
const gchar * const CONFIG_CANDIDATE_KEYS = "candidatekeys";
@@ -96,6 +97,7 @@ ZhuyinConfig::initDefaultValues (void)
m_always_input_numbers = FALSE;
m_space_show_candidates = FALSE;
+ m_candidates_after_cursor = TRUE;
m_candidate_keys = "1234567890";
@@ -188,6 +190,7 @@ ZhuyinConfig::readDefaultValues (void)
m_always_input_numbers = read (CONFIG_ALWAYS_INPUT_NUMBERS, false);
m_space_show_candidates = read (CONFIG_SPACE_SHOW_CANDIDATES, false);
+ m_candidates_after_cursor = read (CONFIG_CANDIDATES_AFTER_CURSOR, true);
gint layout = read (CONFIG_KEYBOARD_LAYOUT, 0);
m_keyboard_layout = CHEWING_DEFAULT;
@@ -246,6 +249,8 @@ ZhuyinConfig::valueChanged (const std::string &section,
m_always_input_numbers = normalizeGVariant (value, false);
else if (CONFIG_SPACE_SHOW_CANDIDATES == name)
m_space_show_candidates = normalizeGVariant (value, false);
+ else if (CONFIG_CANDIDATES_AFTER_CURSOR == name)
+ m_candidates_after_cursor = normalizeGVariant (value, true);
else if (CONFIG_KEYBOARD_LAYOUT == name) {
gint layout = normalizeGVariant (value, 0);
m_keyboard_layout = CHEWING_DEFAULT;