From 717ec8f7335511d33a2a0f054bb1eb141c945a79 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 13 May 2010 18:56:13 +0800 Subject: [PATCH] add aux and preedit text. --- src/ExtEditor.cc | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/ExtEditor.cc b/src/ExtEditor.cc index b8cf0c3..8e39fae 100644 --- a/src/ExtEditor.cc +++ b/src/ExtEditor.cc @@ -220,8 +220,10 @@ ExtEditor::fillCommand(std::string command_name, const char * argument){ int result_num = ibus_engine_plugin_call(m_lua_plugin, command->lua_function_name, argument); + if ( 1 == result_num ) + m_mode = LABEL_LIST_SINGLE; - + return true; } @@ -246,6 +248,29 @@ ExtEditor::sendLookupTable() } } +void +ExtEditor::updatePreeditText(){ + if( G_UNLIKELY(m_preedit_text.empty()) ){ + hidePreeditText (); + return; + } + + StaticText preedit_text(m_preedit_text); + Editor::updatePreeditText(preedit_text, m_cursor, TRUE); +} + +void +ExtEditor::updateAuxiliaryText(){ + if( G_UNLIKELY(m_auxiliary_text.empty()) ){ + hideAuxiliaryText (); + return; + } + + StaticText aux_text (m_auxiliary_text); + Editor::updateAuxiliaryText (aux_text, TRUE); +} + + }; -- 2.7.4