diff options
| author | Peng Wu <alexepico@gmail.com> | 2011-10-10 14:08:17 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2011-12-22 12:23:14 +0800 |
| commit | 4b6fb2b018f52b1af75fa8aebb629497fef5a07f (patch) | |
| tree | b91ff13e03ee2532aac9c9da61dada516f480a91 /src | |
| parent | bb096fc88fdfb03deb8e29f0865676f540ce3669 (diff) | |
| download | ibus-libpinyin-4b6fb2b018f52b1af75fa8aebb629497fef5a07f.tar.gz ibus-libpinyin-4b6fb2b018f52b1af75fa8aebb629497fef5a07f.tar.xz ibus-libpinyin-4b6fb2b018f52b1af75fa8aebb629497fef5a07f.zip | |
add update when select candidate
Diffstat (limited to 'src')
| -rw-r--r-- | src/PYPBopomofoEditor.cc | 2 | ||||
| -rw-r--r-- | src/PYPPhoneticEditor.cc | 3 | ||||
| -rw-r--r-- | src/PYPPinyinEditor.cc | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/PYPBopomofoEditor.cc b/src/PYPBopomofoEditor.cc index 185fdb3..34f3df7 100644 --- a/src/PYPBopomofoEditor.cc +++ b/src/PYPBopomofoEditor.cc @@ -134,6 +134,7 @@ LibPinyinBopomofoEditor::processAuxiliarySelectKey m_select_mode = TRUE; selectCandidateInPage (i); + update (); return TRUE; } @@ -162,6 +163,7 @@ LibPinyinBopomofoEditor::processSelectKey (guint keyval, guint keycode, guint i = pos - keys; selectCandidateInPage (i); + update (); return TRUE; } diff --git a/src/PYPPhoneticEditor.cc b/src/PYPPhoneticEditor.cc index 14773a7..a5d7675 100644 --- a/src/PYPPhoneticEditor.cc +++ b/src/PYPPhoneticEditor.cc @@ -320,7 +320,8 @@ LibPinyinPhoneticEditor::selectCandidate (guint i) /* NOTE: deal with normal candidates selection here by libpinyin. */ phrase_token_t *token = &g_array_index (m_candidates, phrase_token_t, i); - pinyin_choose_candidate(m_instance, pinyin_cursor, *token); + pinyin_choose_candidate (m_instance, pinyin_cursor, *token); + pinyin_guess_sentence (m_instance); return TRUE; } diff --git a/src/PYPPinyinEditor.cc b/src/PYPPinyinEditor.cc index 3d7deff..4b8aa21 100644 --- a/src/PYPPinyinEditor.cc +++ b/src/PYPPinyinEditor.cc @@ -57,7 +57,7 @@ LibPinyinPinyinEditor::processNumber (guint keyval, guint keycode, { guint i; - if (!m_text) + if (m_text.empty ()) return FALSE; switch (keyval) { @@ -78,6 +78,7 @@ LibPinyinPinyinEditor::processNumber (guint keyval, guint keycode, if (modifiers == 0) selectCandidateInPage (i); + update (); return TRUE; } |
