diff --git a/honoka/libhonoka/predictor.cpp b/honoka/libhonoka/predictor.cpp index cee9f31..16f066e 100644 --- a/honoka/libhonoka/predictor.cpp +++ b/honoka/libhonoka/predictor.cpp @@ -89,7 +89,7 @@ */ String Predictor::getPropertyName() { - return getName(); + return String(_("Predicter")); } /*! @@ -97,7 +97,7 @@ */ String Predictor::getName() { - return String(_("Predicter")); + return String("Predictor"); } diff --git a/honoka/src/honoka_imengine.cpp b/honoka/src/honoka_imengine.cpp index 24efa04..55db909 100644 --- a/honoka/src/honoka_imengine.cpp +++ b/honoka/src/honoka_imengine.cpp @@ -309,6 +309,7 @@ mini_status = _scim_config->read(String(HONOKA_CONFIG_MINISTATUS),HONOKA_DEFAULT_MINISTATUS); numkeyselect = _scim_config->read(String(HONOKA_CONFIG_NUMKEY_SELECT),HONOKA_DEFAULT_NUMKEY_SELECT); prediction = _scim_config->read(String(HONOKA_CONFIG_PREDICTION),HONOKA_DEFAULT_PREDICTION); + if (m_predictor->getName() == "Predictor") prediction = false; defaultPreEditor = _scim_config->read(String(HONOKA_CONFIG_DEFAULT_PREEDITOR),String(HONOKA_DEFAULT_DEFAULT_PREEDITOR)); defaultConvertor = _scim_config->read(String(HONOKA_CONFIG_DEFAULT_CONVERTOR),String(HONOKA_DEFAULT_DEFAULT_CONVERTOR)); @@ -472,6 +473,7 @@ bool HonokaInstance::changePredictor(const String &name) { // Predictor���ѹ�����᥽�åɡ� + if (!prediction) return false; for(unsigned int i = 0;i < predictors.size();i ++) { if (predictors[i]->getName() == name) { m_predictor = predictors[i]; @@ -498,15 +500,15 @@ preeditors[i]->getPropertyName(),String(""),_("mode status")); m_proplist.push_back(p); } - - p = Property(HONOKA_PROP_PREDICTOR,"",String(""),_("predictor")); - m_proplist.push_back(p); - for(unsigned int i = 0;i < predictors.size();i ++) { - p = Property(String(HONOKA_PROP_PREDICTOR) + String("/") + predictors[i]->getName(), - predictors[i]->getPropertyName(),String(""),_("mode status")); + if (prediction) { + p = Property(HONOKA_PROP_PREDICTOR,"",String(""),_("predictor")); m_proplist.push_back(p); + for(unsigned int i = 0;i < predictors.size();i ++) { + p = Property(String(HONOKA_PROP_PREDICTOR) + String("/") + predictors[i]->getName(), + predictors[i]->getPropertyName(),String(""),_("mode status")); + m_proplist.push_back(p); + } } - p = Property(HONOKA_PROP_CONVERTOR,"",String(""),_("convertor")); m_proplist.push_back(p); for(unsigned int i = 0;i < convertors.size();i ++) { @@ -525,11 +527,13 @@ it->set_label(m_preeditor->getPropertyName()); } update_property(*it); - it = find(m_proplist.begin(),m_proplist.end(),HONOKA_PROP_PREDICTOR); - if (it != m_proplist.end()) { - it->set_label(m_predictor->getPropertyName()); + if (prediction) { + it = find(m_proplist.begin(),m_proplist.end(),HONOKA_PROP_PREDICTOR); + if (it != m_proplist.end()) { + it->set_label(m_predictor->getPropertyName()); + } + update_property(*it); } - update_property(*it); it = find(m_proplist.begin(),m_proplist.end(),HONOKA_PROP_CONVERTOR); if (it != m_proplist.end()) { it->set_label(m_convertor->getPropertyName());