diff options
author | Peng Wu <alexepico@gmail.com> | 2014-04-29 12:30:15 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2014-04-29 12:30:15 +0800 |
commit | 7813d0b1711f08b0164242499c6ac02d30fab966 (patch) | |
tree | 454f950e36ae4acf9dfefa998e78daf96756ecfb /src/PYLibPinyin.cc | |
parent | ad0e422ceaafe4fcddfc579d2061d93a6e711ab0 (diff) | |
download | ibus-libpinyin-7813d0b1711f08b0164242499c6ac02d30fab966.tar.gz ibus-libpinyin-7813d0b1711f08b0164242499c6ac02d30fab966.tar.xz ibus-libpinyin-7813d0b1711f08b0164242499c6ac02d30fab966.zip |
improves m_bopomofo_keyboard_mapping read
Diffstat (limited to 'src/PYLibPinyin.cc')
-rw-r--r-- | src/PYLibPinyin.cc | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/PYLibPinyin.cc b/src/PYLibPinyin.cc index 78299d5..57b61fa 100644 --- a/src/PYLibPinyin.cc +++ b/src/PYLibPinyin.cc @@ -177,32 +177,14 @@ LibPinyinBackEnd::setPinyinOptions (Config *config) return TRUE; } -/* Here are the chewing keyboard scheme mapping table. */ -static const struct { - gint bopomofo_keyboard; - ChewingScheme scheme; -} chewing_options [] = { - {0, CHEWING_STANDARD}, - {1, CHEWING_GINYIEH}, - {2, CHEWING_ETEN}, - {3, CHEWING_IBM} -}; - - gboolean LibPinyinBackEnd::setChewingOptions (Config *config) { if (NULL == m_chewing_context) return FALSE; - const gint map = config->bopomofoKeyboardMapping (); - for (guint i = 0; i < G_N_ELEMENTS (chewing_options); i++) { - if (map == chewing_options[i].bopomofo_keyboard) { - /* TODO: set chewing scheme. */ - ChewingScheme scheme = chewing_options[i].scheme; - pinyin_set_chewing_scheme (m_chewing_context, scheme); - } - } + ChewingScheme scheme = config->bopomofoKeyboardMapping (); + pinyin_set_chewing_scheme (m_chewing_context, scheme); pinyin_option_t options = config->option() | USE_TONE; pinyin_set_options(m_chewing_context, options); |