diff options
author | Peng Wu <alexepico@gmail.com> | 2012-12-05 12:00:51 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-12-05 12:00:51 +0800 |
commit | 938f2649b75efb3f0b72f3af7567ad8198d17147 (patch) | |
tree | 909ef7b4b815e7e14487b3ae2eee49a6b1280e4d | |
parent | 9adfcbc7784845e324b84fb51bbfcc2c502e5b20 (diff) | |
download | ibus-libpinyin-938f2649b75efb3f0b72f3af7567ad8198d17147.tar.gz ibus-libpinyin-938f2649b75efb3f0b72f3af7567ad8198d17147.tar.xz ibus-libpinyin-938f2649b75efb3f0b72f3af7567ad8198d17147.zip |
fixes get_chewing_string
-rw-r--r-- | src/PYPBopomofoEditor.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/PYPBopomofoEditor.cc b/src/PYPBopomofoEditor.cc index 1f201b5..2a23f8a 100644 --- a/src/PYPBopomofoEditor.cc +++ b/src/PYPBopomofoEditor.cc @@ -344,8 +344,11 @@ LibPinyinBopomofoEditor::updateAuxiliaryText (void) PinyinKeyPos *pos = &g_array_index (pinyin_poses, PinyinKeyPos, i); guint cursor = pos->m_raw_begin; + gchar * str = NULL; if (G_UNLIKELY (cursor == m_cursor)) { /* at word boundary. */ - m_buffer << '|' << key->get_chewing_string (); + pinyin_get_chewing_string(m_instance, key, &str); + m_buffer << '|' << str; + g_free(str); } else if (G_LIKELY ( cursor < m_cursor && m_cursor < pos->m_raw_end )) { /* in word */ /* raw text */ @@ -371,7 +374,9 @@ LibPinyinBopomofoEditor::updateAuxiliaryText (void) m_buffer << *iter; } } else { /* other words */ - m_buffer << ' ' << key->get_chewing_string (); + pinyin_get_chewing_string(m_instance, key, &str); + m_buffer << ' ' << str; + g_free(str); } } |