diff options
author | Peng Wu <alexepico@gmail.com> | 2018-06-11 13:46:38 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2018-06-11 13:46:38 +0800 |
commit | 21efde045adb52ef5341b567ec0d76e06d822105 (patch) | |
tree | 164f5079fc0a7c0f5dc378ac341b4b504edf8f31 /src | |
parent | 7b485605d696bb96a6024d22a259336dcd16fb72 (diff) | |
download | ibus-libpinyin-21efde045adb52ef5341b567ec0d76e06d822105.tar.gz ibus-libpinyin-21efde045adb52ef5341b567ec0d76e06d822105.tar.xz ibus-libpinyin-21efde045adb52ef5341b567ec0d76e06d822105.zip |
update comments
Diffstat (limited to 'src')
-rw-r--r-- | src/PYPEnhancedCandidates.h | 3 | ||||
-rw-r--r-- | src/PYPPinyinEngine.cc | 6 | ||||
-rw-r--r-- | src/PYPPinyinEngine.h | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/PYPEnhancedCandidates.h b/src/PYPEnhancedCandidates.h index ba5211c..8c2a33f 100644 --- a/src/PYPEnhancedCandidates.h +++ b/src/PYPEnhancedCandidates.h @@ -38,7 +38,8 @@ enum CandidateType { /* both normal candidate and user candidate */ CANDIDATE_USER, CANDIDATE_TRADITIONAL_CHINESE, - CANDIDATE_LUA_EXTENSION, + CANDIDATE_LUA_TRIGGER, + CANDIDATE_LUA_CONVERTER, CANDIDATE_CLOUD_INPUT, CANDIDATE_EMOJI }; diff --git a/src/PYPPinyinEngine.cc b/src/PYPPinyinEngine.cc index d80d144..ca118b5 100644 --- a/src/PYPPinyinEngine.cc +++ b/src/PYPPinyinEngine.cc @@ -177,6 +177,12 @@ PinyinEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers) return FALSE; if (m_props.modeChinese ()) { + /* return from MODE_SUGGESTION to normal input. */ + if (m_input_mode == MODE_SUGGESTION) { + /* only accept input to select candidate. */ + } + + /* handle normal input. */ if (m_input_mode == MODE_INIT && (cmshm_filter (modifiers) == 0)) { const String & text = m_editors[MODE_INIT]->text (); diff --git a/src/PYPPinyinEngine.h b/src/PYPPinyinEngine.h index 5a19cc3..666368a 100644 --- a/src/PYPPinyinEngine.h +++ b/src/PYPPinyinEngine.h @@ -67,6 +67,7 @@ private: MODE_ENGLISH, // press v into English input mode MODE_STROKE, // press u into stroke input mode MODE_EXTENSION, // press i into extension input mode + MODE_SUGGESTION, // suggestion mode MODE_LAST, } m_input_mode; |