From: Peng Wu Date: Mon, 9 Jul 2012 07:50:04 +0000 (+0800) Subject: fixes updatePinyin X-Git-Tag: 1.4.2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d8a65fdcefe0a8809740adb86f3d45d8c454793;p=platform%2Fupstream%2Fibus-libpinyin.git fixes updatePinyin --- diff --git a/src/PYPBopomofoEditor.cc b/src/PYPBopomofoEditor.cc index 331a651..1f201b5 100644 --- a/src/PYPBopomofoEditor.cc +++ b/src/PYPBopomofoEditor.cc @@ -241,6 +241,7 @@ LibPinyinBopomofoEditor::updatePinyin (void) m_pinyin_len = 0; /* TODO: check whether to replace "" with NULL. */ pinyin_parse_more_chewings (m_instance, ""); + pinyin_guess_sentence(m_instance); return; } diff --git a/src/PYPDoublePinyinEditor.cc b/src/PYPDoublePinyinEditor.cc index 8a39a42..7e690f4 100644 --- a/src/PYPDoublePinyinEditor.cc +++ b/src/PYPDoublePinyinEditor.cc @@ -103,6 +103,7 @@ LibPinyinDoublePinyinEditor::updatePinyin (void) m_pinyin_len = 0; /* TODO: check whether to replace "" with NULL. */ pinyin_parse_more_double_pinyins (m_instance, ""); + pinyin_guess_sentence(m_instance); return; } diff --git a/src/PYPFullPinyinEditor.cc b/src/PYPFullPinyinEditor.cc index 90e3f2f..eb58b6b 100644 --- a/src/PYPFullPinyinEditor.cc +++ b/src/PYPFullPinyinEditor.cc @@ -74,6 +74,7 @@ LibPinyinFullPinyinEditor::updatePinyin (void) m_pinyin_len = 0; /* TODO: check whether to replace "" with NULL. */ pinyin_parse_more_full_pinyins (m_instance, ""); + pinyin_guess_sentence(m_instance); return; } diff --git a/src/PYPPhoneticEditor.cc b/src/PYPPhoneticEditor.cc index 13e6011..5e47be3 100644 --- a/src/PYPPhoneticEditor.cc +++ b/src/PYPPhoneticEditor.cc @@ -339,6 +339,7 @@ LibPinyinPhoneticEditor::getLookupCursor (void) { PinyinKeyVector & pinyins = m_instance->m_pinyin_keys; guint lookup_cursor = getPinyinCursor (); + /* show candidates when pinyin cursor is at end. */ if (lookup_cursor == pinyins->len && m_pinyin_len == m_text.length()) lookup_cursor = 0;