fixes updatePinyin
authorPeng Wu <alexepico@gmail.com>
Mon, 9 Jul 2012 07:50:04 +0000 (15:50 +0800)
committerPeng Wu <alexepico@gmail.com>
Mon, 9 Jul 2012 07:50:04 +0000 (15:50 +0800)
src/PYPBopomofoEditor.cc
src/PYPDoublePinyinEditor.cc
src/PYPFullPinyinEditor.cc
src/PYPPhoneticEditor.cc

index 331a651..1f201b5 100644 (file)
@@ -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;
     }
 
index 8a39a42..7e690f4 100644 (file)
@@ -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;
     }
 
index 90e3f2f..eb58b6b 100644 (file)
@@ -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;
     }
 
index 13e6011..5e47be3 100644 (file)
@@ -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;