From e6ff8c72bd4de2f02a7c26c9e4d614646fb12e62 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 23 May 2017 16:21:05 +0800 Subject: drop zhuyin_valid_zhuyin_keys function --- src/ZYZPinyinEditor.cc | 12 ------------ src/ZYZZhuyinEditor.cc | 15 ++------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/ZYZPinyinEditor.cc b/src/ZYZPinyinEditor.cc index fdb98aa..05e1c92 100644 --- a/src/ZYZPinyinEditor.cc +++ b/src/ZYZPinyinEditor.cc @@ -90,18 +90,6 @@ PinyinEditor::updateZhuyin (void) zhuyin_instance_t * instance = m_instances[index]; size_t len = zhuyin_parse_more_full_pinyins (instance, section.c_str ()); - bool valid = zhuyin_valid_zhuyin_keys (instance); - if (!valid) { - size_t valid_len = zhuyin_get_parsed_input_length (instance); - - const gchar * str = NULL; - zhuyin_get_raw_user_input (instance, &str); - section = str; - - /* hack here: usually only one zhuyin key will have problem, - so it is safe to just move the cursor. */ - m_cursor -= len - valid_len; - } zhuyin_guess_sentence (instance); new_text += section; diff --git a/src/ZYZZhuyinEditor.cc b/src/ZYZZhuyinEditor.cc index a4d5486..1d7b99a 100644 --- a/src/ZYZZhuyinEditor.cc +++ b/src/ZYZZhuyinEditor.cc @@ -92,23 +92,12 @@ ZhuyinEditor::updateZhuyin (void) zhuyin_instance_t * instance = m_instances[index]; size_t len = zhuyin_parse_more_chewings (instance, section.c_str ()); - bool valid = zhuyin_valid_zhuyin_keys (instance); - if (!valid) { - size_t valid_len = zhuyin_get_parsed_input_length (instance); - - const gchar * str = NULL; - zhuyin_get_raw_user_input (instance, &str); - section = str; - - /* hack here: usually only one zhuyin key will have problem, - so it is safe to just move the cursor. */ - m_cursor -= len - valid_len; - } zhuyin_guess_sentence (instance); new_text += section; append_offset += section.length (); +#if 0 /* check whether the last character is tone, if not part of parsed chewing input, turn the tone into symbol. */ @@ -142,7 +131,7 @@ ZhuyinEditor::updateZhuyin (void) } g_strfreev (symbols); } - +#endif ++index; } -- cgit