diff options
author | Peng Wu <alexepico@gmail.com> | 2018-06-14 15:53:43 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2018-06-14 15:53:43 +0800 |
commit | 7216bcd03777defa253f2c70eeda364f345970dc (patch) | |
tree | 444433ba617bee7b2eecbcf2e3ad6a6441642c90 /src/PYPConfig.cc | |
parent | 94e9584b8b81cdcb4bce15ab58e83001bd085192 (diff) | |
download | ibus-libpinyin-7216bcd03777defa253f2c70eeda364f345970dc.tar.gz ibus-libpinyin-7216bcd03777defa253f2c70eeda364f345970dc.tar.xz ibus-libpinyin-7216bcd03777defa253f2c70eeda364f345970dc.zip |
add option show suggestion
Diffstat (limited to 'src/PYPConfig.cc')
-rw-r--r-- | src/PYPConfig.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/PYPConfig.cc b/src/PYPConfig.cc index aa13f6c..2253b00 100644 --- a/src/PYPConfig.cc +++ b/src/PYPConfig.cc @@ -35,6 +35,7 @@ const gchar * const CONFIG_ORIENTATION = "lookup-table-orientation const gchar * const CONFIG_PAGE_SIZE = "lookup-table-page-size"; const gchar * const CONFIG_REMEMBER_EVERY_INPUT = "remember-every-input"; const gchar * const CONFIG_SORT_OPTION = "sort-candidate-option"; +const gchar * const CONFIG_SHOW_SUGGESTION = "show-suggestion"; const gchar * const CONFIG_SHIFT_SELECT_CANDIDATE = "shift-select-candidate"; const gchar * const CONFIG_MINUS_EQUAL_PAGE = "minus-equal-page"; const gchar * const CONFIG_COMMA_PERIOD_PAGE = "comma-period-page"; @@ -98,6 +99,7 @@ LibPinyinConfig::initDefaultValues (void) m_page_size = 5; m_remember_every_input = FALSE; m_sort_option = SORT_BY_PHRASE_LENGTH_AND_PINYIN_LENGTH_AND_FREQUENCY; + m_show_suggestion = TRUE; m_shift_select_candidate = FALSE; m_minus_equal_page = TRUE; @@ -204,6 +206,8 @@ LibPinyinConfig::readDefaultValues (void) } } + m_show_suggestion = read (CONFIG_SHOW_SUGGESTION, true); + m_dictionaries = read (CONFIG_DICTIONARIES, ""); m_main_switch = read (CONFIG_MAIN_SWITCH, "<Shift>"); @@ -265,6 +269,8 @@ LibPinyinConfig::valueChanged (const std::string &schema_id, m_sort_option = sort_options[i].sort_option; } } + } else if (CONFIG_SHOW_SUGGESTION == name) { + m_show_suggestion = normalizeGVariant (value, true); } else if (CONFIG_DICTIONARIES == name) { m_dictionaries = normalizeGVariant (value, std::string ("")); } else if (CONFIG_MAIN_SWITCH == name) { |