diff --git a/scim-wnn/src/preeditor.cpp b/scim-wnn/src/preeditor.cpp index f5b92fa..d3e04e3 100644 --- a/scim-wnn/src/preeditor.cpp +++ b/scim-wnn/src/preeditor.cpp @@ -56,6 +56,15 @@ /*! + \fn PreEditor::textIsEmpty() + */ +bool PreEditor::textIsEmpty() +{ + return(text.empty()); +} + + +/*! \fn PreEditor::setPos(int p) */ void PreEditor::setPos(int p) diff --git a/scim-wnn/src/preeditor.h b/scim-wnn/src/preeditor.h index 7b9a0b5..921dcd6 100644 --- a/scim-wnn/src/preeditor.h +++ b/scim-wnn/src/preeditor.h @@ -57,6 +57,7 @@ int getPos(); virtual void setPos(int p); int getTextLength(); + bool textIsEmpty(); virtual void reset(); virtual WideString getText(bool hosei = false); virtual void backspace(); diff --git a/scim-wnn/src/scim_wnn_imengine.cpp b/scim-wnn/src/scim_wnn_imengine.cpp index c4f2722..861eaf5 100644 --- a/scim-wnn/src/scim_wnn_imengine.cpp +++ b/scim-wnn/src/scim_wnn_imengine.cpp @@ -350,18 +350,7 @@ show_preedit_string(); update_preedit_string(m_preeditor->getText()); update_preedit_caret(m_preeditor->getPos()); - } else { - hide_preedit_string(); - hide_lookup_table(); - } - if (mini_status) { - update_aux_string(utf8_mbstowcs(m_preeditor->getModeName())); - show_aux_string(); - } else { - hide_aux_string(); - } - - if ((!m_conversion) && yosoku && m_preeditor->getTextLength() && wnn.isConnected() && (sType == Wnn7)) { + if ((!m_conversion) && yosoku && wnn.isConnected() && (sType == Wnn7)) { m_convList = wnn.getYosokuList(m_preeditor->getText()); if (m_convList.count) { m_lookup_table.clear(); @@ -374,6 +363,16 @@ hide_lookup_table(); } } else hide_lookup_table(); + } else { + hide_preedit_string(); + hide_lookup_table(); + } + if (mini_status) { + update_aux_string(utf8_mbstowcs(m_preeditor->getModeName())); + show_aux_string(); + } else { + hide_aux_string(); + } updateProperty(); } @@ -774,20 +773,21 @@ void WnnInstance::reset () { + // Qt-immodule+scim-qtimm�ǤϤ��Υ᥽�åɤ����̤˸ƤФ��褦������¾�ǤϤɤ��ʤΤ����� alp_count = 0; m_conversion = false; m_lookup = false; wnn.reset(); m_preeditor->reset(); - if (wnn.isConnected()) wnn.wnnDisconnect(); - wnn.wnnConnect(String("scim-wnn"),host,rc,sType,0); - updatePreEditor(); + //if (wnn.isConnected()) wnn.wnnDisconnect(); + //wnn.wnnConnect(String("scim-wnn"),host,rc,sType,0); + //updatePreEditor(); } void WnnInstance::focus_in () { if (!m_conversion) updatePreEditor(); - updateProperty(); + else updateProperty(); } void WnnInstance::focus_out ()