summaryrefslogtreecommitdiffstats
path: root/src/PYPConfig.cc
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-12-16 13:32:32 +0800
committerPeng Wu <alexepico@gmail.com>2014-12-16 13:32:32 +0800
commitcb73f581e5e8d33a681caf89dfb4bf76a77db370 (patch)
treeafcc0e3c4208f8d6c8ca738c264e29281e220336 /src/PYPConfig.cc
parent5d2c9654c565d1eb59e9e752d54cee65c7c4f4f0 (diff)
downloadibus-libpinyin-cb73f581e5e8d33a681caf89dfb4bf76a77db370.tar.gz
ibus-libpinyin-cb73f581e5e8d33a681caf89dfb4bf76a77db370.tar.xz
ibus-libpinyin-cb73f581e5e8d33a681caf89dfb4bf76a77db370.zip
add remember every input option to class Config
Diffstat (limited to 'src/PYPConfig.cc')
-rw-r--r--src/PYPConfig.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/PYPConfig.cc b/src/PYPConfig.cc
index 0129b03..2449eb7 100644
--- a/src/PYPConfig.cc
+++ b/src/PYPConfig.cc
@@ -32,6 +32,7 @@ const gchar * const CONFIG_CORRECT_PINYIN = "CorrectPinyin";
const gchar * const CONFIG_FUZZY_PINYIN = "FuzzyPinyin";
const gchar * const CONFIG_ORIENTATION = "LookupTableOrientation";
const gchar * const CONFIG_PAGE_SIZE = "LookupTablePageSize";
+const gchar * const CONFIG_REMEMBER_EVERY_INPUT = "RememberEveryInput";
/* const gchar * const CONFIG_CTRL_SWITCH = "CtrlSwitch"; */
const gchar * const CONFIG_MAIN_SWITCH = "MainSwitch";
const gchar * const CONFIG_LETTER_SWITCH = "LetterSwitch";
@@ -90,6 +91,8 @@ LibPinyinConfig::initDefaultValues (void)
m_orientation = IBUS_ORIENTATION_HORIZONTAL;
m_page_size = 5;
+ m_remember_every_input = FALSE;
+
m_shift_select_candidate = FALSE;
m_minus_equal_page = TRUE;
m_comma_period_page = TRUE;
@@ -168,6 +171,8 @@ LibPinyinConfig::readDefaultValues (void)
m_page_size = 5;
g_warn_if_reached ();
}
+ m_remember_every_input = read (CONFIG_REMEMBER_EVERY_INPUT, false);
+
m_main_switch = read(CONFIG_MAIN_SWITCH, std::string ("<Shift>"));
m_letter_switch = read(CONFIG_LETTER_SWITCH, std::string (""));
m_punct_switch = read(CONFIG_PUNCT_SWITCH, std::string ("<Control>period"));
@@ -216,6 +221,8 @@ LibPinyinConfig::valueChanged (const std::string &section,
m_page_size = 5;
g_warn_if_reached ();
}
+ } else if (CONFIG_REMEMBER_EVERY_INPUT == name) {
+ m_remember_every_input = normalizeGVariant (value, false);
} else if (CONFIG_MAIN_SWITCH == name) {
m_main_switch = normalizeGVariant (value, std::string ("<Shift>"));
} else if (CONFIG_LETTER_SWITCH == name) {