summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-09-26 13:12:38 +0800
committerPeng Wu <alexepico@gmail.com>2014-09-26 13:12:38 +0800
commit66ff3abb03cc82886e4523e6690b091226070e69 (patch)
treeaa27e9159a5e680b538f7da8be9330e1ab1b01fc
parenta8e3129ef96985c05752ddc1b72f401f3ca9a0c9 (diff)
downloadibus-libzhuyin-1.6.99.20140929.tar.gz
ibus-libzhuyin-1.6.99.20140929.tar.xz
ibus-libzhuyin-1.6.99.20140929.zip
write updateLookupTableLabel method1.6.99.20140929
-rw-r--r--src/ZYZPhoneticEditor.cc14
-rw-r--r--src/ZYZPhoneticEditor.h1
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);