diff options
author | Peng Wu <alexepico@gmail.com> | 2015-08-07 14:23:54 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2015-08-07 14:41:51 +0800 |
commit | 13bc6023c48809b242945c89ff63a27545e3912f (patch) | |
tree | e577d1db855976b394668c84fc5924a4aa0a22ed /src/ZYZPinyinEditor.cc | |
parent | 828fa4586307d0886b714aad01ae99512ed9dcdf (diff) | |
download | ibus-libzhuyin-13bc6023c48809b242945c89ff63a27545e3912f.tar.gz ibus-libzhuyin-13bc6023c48809b242945c89ff63a27545e3912f.tar.xz ibus-libzhuyin-13bc6023c48809b242945c89ff63a27545e3912f.zip |
fixes processSpace method
Diffstat (limited to 'src/ZYZPinyinEditor.cc')
-rw-r--r-- | src/ZYZPinyinEditor.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ZYZPinyinEditor.cc b/src/ZYZPinyinEditor.cc index 4d7abe0..33173ae 100644 --- a/src/ZYZPinyinEditor.cc +++ b/src/ZYZPinyinEditor.cc @@ -234,6 +234,30 @@ PinyinEditor::insert (guint keyval, guint keycode, guint modifiers) } gboolean +PinyinEditor::processSpace (guint keyval, guint keycode, guint modifiers) +{ + if (IBUS_space != keyval && IBUS_KP_Space != keyval) + return FALSE; + + if (PhoneticEditor::processSpace (keyval, keycode, modifiers)) + return TRUE; + + if (STATE_INPUT == m_input_state) { + if (cmshm_filter (modifiers) != 0) + return FALSE; + + if (m_config.spaceShowCandidates ()) { + /* use space to show candidates. */ + prepareCandidates (); + update (); + return TRUE; + } + } + + return FALSE; +} + +gboolean PinyinEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers) { modifiers &= (IBUS_SHIFT_MASK | |