diff options
-rw-r--r-- | src/ZYZPhoneticEditor.cc | 14 | ||||
-rw-r--r-- | src/ZYZPhoneticEditor.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc index c01c3b8..4f036d8 100644 --- a/src/ZYZPhoneticEditor.cc +++ b/src/ZYZPhoneticEditor.cc @@ -362,6 +362,7 @@ PhoneticEditor::updateLookupTable (void) m_lookup_table.clear (); fillLookupTableByPage (); + updateLookupTableLabel (); if (m_lookup_table.size ()) { Editor::updateLookupTable (m_lookup_table, TRUE); } else { @@ -369,6 +370,19 @@ PhoneticEditor::updateLookupTable (void) } } +void +PhoneticEditor::updateLookupTableLabel (void) +{ + String labels = m_config.candidateKeys (); + + size_t len = MIN (labels.length (), m_config.pageSize ()); + for (size_t i = 0; i < len; ++i) { + String label = (gchar) labels[i]; + Text text (label); + m_lookup_table.setLabel (i, text); + } +} + gboolean PhoneticEditor::fillLookupTableByPage (void) { diff --git a/src/ZYZPhoneticEditor.h b/src/ZYZPhoneticEditor.h index 8e42f79..6af152d 100644 --- a/src/ZYZPhoneticEditor.h +++ b/src/ZYZPhoneticEditor.h @@ -67,6 +67,7 @@ public: virtual gboolean processUserSymbolKey (guint keyval, guint keycode, guint modifiers); virtual void updateLookupTable (); virtual void updateLookupTableFast (); + virtual void updateLookupTableLabel (); virtual gboolean fillLookupTableByPage (); virtual gboolean insertPunct (guint ch); |