From 6b4b7a6a082851ac734de624602dd4e7d013ab95 Mon Sep 17 00:00:00 2001 From: BYVoid Date: Fri, 14 May 2010 10:55:49 +0800 Subject: Allow multiple tone character --- src/BopomofoEditor.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/BopomofoEditor.cc b/src/BopomofoEditor.cc index 519b70e..9092c73 100644 --- a/src/BopomofoEditor.cc +++ b/src/BopomofoEditor.cc @@ -26,16 +26,7 @@ BopomofoEditor::insert (gint ch) if (G_UNLIKELY (m_text.length () >= MAX_PINYIN_LEN)) return TRUE; - gint key = keyvalToBopomofo(ch); - if (key >= BOPOMOFO_TONE_2 && key <= BOPOMOFO_TONE_5) { - if (m_cursor == 0) - return TRUE; /* invalid format: tone should not be the first character */ - key = keyvalToBopomofo(m_text.c_str()[m_cursor - 1]); - if (key >= BOPOMOFO_TONE_2 && key <= BOPOMOFO_TONE_5) - return TRUE; /* invalid format: two tone character should not be together */ - } - - m_text.insert (m_cursor++, ch); + m_text.insert (m_cursor++, keyvalToBopomofo(ch)); if (G_UNLIKELY (!(Config::option () & PINYIN_INCOMPLETE_PINYIN))) { updateSpecialPhrases (); -- cgit