summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-09-25 12:17:58 +0800
committerPeng Wu <alexepico@gmail.com>2014-09-25 12:17:58 +0800
commit32f5bdec221b157edc2879d2248a6b9f2743ac50 (patch)
treebd81c056021177afb9d211c4a8579517682a1f42
parented44207ce2b4633c1807dda8d617e0164e34b8b2 (diff)
downloadibus-libzhuyin-32f5bdec221b157edc2879d2248a6b9f2743ac50.tar.gz
ibus-libzhuyin-32f5bdec221b157edc2879d2248a6b9f2743ac50.tar.xz
ibus-libzhuyin-32f5bdec221b157edc2879d2248a6b9f2743ac50.zip
clean class SymbolSection
-rw-r--r--src/ZYZPhoneticEditor.cc12
-rw-r--r--src/ZYZSymbolSection.h1
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) {}