From: Peng Wu Date: Wed, 12 May 2010 05:44:25 +0000 (+0800) Subject: clean up code. X-Git-Tag: 1.3.10~53^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64f12372db7e24af20d000d399d73d74a2667c35;p=platform%2Fupstream%2Fibus-libpinyin.git clean up code. --- 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