summaryrefslogtreecommitdiffstats
path: root/src/PYPBopomofoEditor.cc
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2017-02-10 15:27:55 +0800
committerPeng Wu <alexepico@gmail.com>2017-02-10 15:27:55 +0800
commitb6fa9a62daaec6374d352ed5e4066e7b105a92c9 (patch)
treef37cf92b54e86c7421329234ae52f7aa465e1c1c /src/PYPBopomofoEditor.cc
parent9b70b77d73333486fce7d598749d2431d5cbdb12 (diff)
downloadibus-libpinyin-b6fa9a62daaec6374d352ed5e4066e7b105a92c9.tar.gz
ibus-libpinyin-b6fa9a62daaec6374d352ed5e4066e7b105a92c9.tar.xz
ibus-libpinyin-b6fa9a62daaec6374d352ed5e4066e7b105a92c9.zip
use libpinyin 1.9.91
Diffstat (limited to 'src/PYPBopomofoEditor.cc')
-rw-r--r--src/PYPBopomofoEditor.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/PYPBopomofoEditor.cc b/src/PYPBopomofoEditor.cc
index be89eb5..4588a34 100644
--- a/src/PYPBopomofoEditor.cc
+++ b/src/PYPBopomofoEditor.cc
@@ -137,7 +137,7 @@ BopomofoEditor::processAuxiliarySelectKey
gboolean
BopomofoEditor::processSelectKey (guint keyval, guint keycode,
- guint modifiers)
+ guint modifiers)
{
if (G_UNLIKELY (!m_text))
return FALSE;
@@ -254,7 +254,7 @@ BopomofoEditor::updatePinyin (void)
}
void
-BopomofoEditor::commit ()
+BopomofoEditor::commit (gint index)
{
if (G_UNLIKELY (m_text.empty ()))
return;
@@ -263,7 +263,7 @@ BopomofoEditor::commit ()
/* sentence candidate */
char *tmp = NULL;
- pinyin_get_sentence (m_instance, &tmp);
+ pinyin_get_sentence (m_instance, index, &tmp);
if (tmp) {
if (m_props.modeSimp ()) {
m_buffer << tmp;
@@ -291,9 +291,9 @@ BopomofoEditor::commit ()
++p;
}
- pinyin_train(m_instance);
+ pinyin_train(m_instance, index);
if (m_config.rememberEveryInput ())
- LibPinyinBackEnd::instance ().rememberUserInput (m_instance);
+ LibPinyinBackEnd::instance ().rememberUserInput (m_instance, index);
LibPinyinBackEnd::instance ().modified();
PhoneticEditor::commit ((const gchar *)m_buffer);
reset();
@@ -310,7 +310,7 @@ BopomofoEditor::updatePreeditText ()
m_buffer.clear ();
char *sentence = NULL;
- pinyin_get_sentence(m_instance, &sentence);
+ pinyin_get_sentence(m_instance, 0, &sentence);
if (sentence) {
if (m_props.modeSimp ()) {
m_buffer<<sentence;