diff options
author | Peng Wu <alexepico@gmail.com> | 2011-04-22 07:31:53 -0400 |
---|---|---|
committer | Peng Huang <shawn.p.huang@gmail.com> | 2011-04-22 07:31:53 -0400 |
commit | a16d70e01a441193c6bb8a38d7cf093a7ebed19c (patch) | |
tree | e198cdd089b593a735046520494154aa064b264a /src/PYExtEditor.cc | |
parent | d85a24507314194f1597c4c5d6c460408fcd3a9e (diff) | |
download | ibus-libpinyin-a16d70e01a441193c6bb8a38d7cf093a7ebed19c.tar.gz ibus-libpinyin-a16d70e01a441193c6bb8a38d7cf093a7ebed19c.tar.xz ibus-libpinyin-a16d70e01a441193c6bb8a38d7cf093a7ebed19c.zip |
add English Editor
to speed up English input
BUG=none
TEST=build fine
Review URL: http://codereview.appspot.com/4200041
Patch from Peng Wu <alexepico@gmail.com>.
Diffstat (limited to 'src/PYExtEditor.cc')
-rw-r--r-- | src/PYExtEditor.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PYExtEditor.cc b/src/PYExtEditor.cc index 03a903a..c55714e 100644 --- a/src/PYExtEditor.cc +++ b/src/PYExtEditor.cc @@ -51,7 +51,7 @@ ExtEditor::ExtEditor (PinyinProperties & props, Config & config) m_lua_plugin = ibus_engine_plugin_new (); gchar * path = g_build_filename (g_get_user_config_dir (), - "ibus", "pinyin", "base.lua", NULL); + ".ibus", "pinyin", "base.lua", NULL); loadLuaScript ( ".." G_DIR_SEPARATOR_S "lua" G_DIR_SEPARATOR_S "base.lua")|| loadLuaScript (path) || loadLuaScript (PKGDATADIR G_DIR_SEPARATOR_S "base.lua"); @@ -282,10 +282,10 @@ ExtEditor::processSpace (guint keyval) gboolean ExtEditor::processEnter(guint keyval) { - if ( !(keyval == IBUS_Return) ) + if (keyval != IBUS_Return) return FALSE; - if ( m_text.length () == 0 ) + if (m_text.length () == 0) return FALSE; Text text(m_text); @@ -495,7 +495,7 @@ ExtEditor::updateStateFromInput (void) } if ( ! 'i' == m_text[0] ) { - g_warning ("i is expected in m_input string.\n"); + g_warning ("i is expected in m_text string.\n"); return FALSE; } @@ -750,7 +750,7 @@ void ExtEditor::updateLookupTable (void) { if (m_lookup_table.size ()) { - Editor::updateLookupTable (m_lookup_table, TRUE); + Editor::updateLookupTableFast (m_lookup_table, TRUE); } else { hideLookupTable (); |