From 32f5bdec221b157edc2879d2248a6b9f2743ac50 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 25 Sep 2014 12:17:58 +0800 Subject: clean class SymbolSection --- src/ZYZPhoneticEditor.cc | 12 ++++++------ src/ZYZSymbolSection.h | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc index c56edc8..c01c3b8 100644 --- a/src/ZYZPhoneticEditor.cc +++ b/src/ZYZPhoneticEditor.cc @@ -497,8 +497,8 @@ PhoneticEditor::selectCandidate (guint index) return FALSE; erase_input_sequence (m_text, m_cursor, 1); - insert_symbol (m_text, m_cursor, symbols->m_type, - symbols->m_lookup, symbols->m_choice); + insert_symbol (m_text, m_cursor, symbols->getType (), + symbols->getLookup (), symbols->getChoice ()); m_cursor += offset; m_input_state = STATE_INPUT; @@ -517,15 +517,15 @@ PhoneticEditor::selectCandidate (guint index) return FALSE; if (1 == offset) { /* direct commit. */ - String choice = symbols->m_choice; + String choice = symbols->getChoice (); String lookup; int ch = find_lookup_key (choice); if (ch != 0) lookup = (gchar) ch; - assert (BUILTIN_SYMBOL_TYPE == symbols->m_type); + assert (BUILTIN_SYMBOL_TYPE == symbols->getType ()); erase_input_sequence (m_text, m_cursor, 1); - insert_symbol (m_text, m_cursor, symbols->m_type, + insert_symbol (m_text, m_cursor, symbols->getType (), lookup, choice); m_cursor += offset; @@ -536,7 +536,7 @@ PhoneticEditor::selectCandidate (guint index) } if (1 < offset) { /* show candidate. */ - String choice = symbols->m_choice; + String choice = symbols->getChoice (); m_input_state = STATE_USER_SYMBOL_SHOWN; m_symbol_sections[m_input_state]->initCandidates diff --git a/src/ZYZSymbolSection.h b/src/ZYZSymbolSection.h index fce65f2..8e75888 100644 --- a/src/ZYZSymbolSection.h +++ b/src/ZYZSymbolSection.h @@ -31,7 +31,6 @@ namespace ZY { class ZhuyinProperties; class SymbolSection { - friend class PhoneticEditor; public: SymbolSection (PhoneticEditor & editor, ZhuyinProperties & props) : m_editor (editor), m_props(props) {} -- cgit