From 64f12372db7e24af20d000d399d73d74a2667c35 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 12 May 2010 13:44:25 +0800 Subject: [PATCH] clean up code. --- src/ExtEditor.cc | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/ExtEditor.cc b/src/ExtEditor.cc index 97b3e7e..ff0c7ac 100644 --- a/src/ExtEditor.cc +++ b/src/ExtEditor.cc @@ -13,7 +13,7 @@ ExtEditor::ExtEditor (PinyinProperties & props) { m_lua_plugin = ibus_engine_plugin_new(); - loadLuaScript("./lua/base.lua"); + loadLuaScript("../lua/base.lua"); m_input = ""; m_lookup_table.clear(); @@ -188,20 +188,7 @@ ExtEditor::updateStateFromInput() bool ExtEditor::fillCommandCandidates() { - - /* try to replace this with fillCommandCandidates("") call. */ - clearLookupTable(); - - /* fill candidates here. */ - const GArray * commands = ibus_engine_plugin_get_available_commands(m_lua_plugin); - for ( int i = 0; i < commands->len; ++i){ - lua_command_t * command = &g_array_index(commands, lua_command_t, i); - m_lookup_table.appendLabel(Text(command->command_name)); - m_lookup_table.appendCandidate(Text(command->description)); - } - - sendLookupTable(); - return true; + return fillCommandCandidates(""); } bool -- 2.7.4