Support prediction allow mode 91/44891/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 29 Jul 2015 06:42:42 +0000 (15:42 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 29 Jul 2015 06:42:42 +0000 (15:42 +0900)
Change-Id: Id49a2de69e1840cffd75a4c5585c361a648be9f6

ism/extras/efl_wsc/isf_wsc_context.cpp
ism/extras/efl_wsc/isf_wsc_context.h
ism/extras/efl_wsc/isf_wsc_control_ui.cpp
ism/extras/efl_wsc/isf_wsc_efl.cpp [changed mode: 0755->0644]

index 90845e7..90f7ac0 100644 (file)
 #include "isf_wsc_control_ui.h"
 #define ENABLE_BACKKEY 1
 
+#ifdef LOG_TAG
+# undef LOG_TAG
+#endif
+#define LOG_TAG                                         "ISF_WSC_EFL"
+
 using namespace scim;
 
 struct _WSCContextISFImpl {
@@ -1383,6 +1388,17 @@ Ecore_IMF_Input_Hints wsc_context_input_hint_get (weescim *ctx)
     return (Ecore_IMF_Input_Hints)input_hint;
 }
 
+Eina_Bool wsc_context_prediction_allow_get (weescim *ctx)
+{
+    if (!ctx)
+        return EINA_FALSE;
+
+    if (ctx->content_hint & WL_TEXT_INPUT_CONTENT_HINT_AUTO_COMPLETION)
+        return EINA_TRUE;
+    else
+        return EINA_FALSE;
+}
+
 void wsc_context_delete_surrounding (weescim *ctx, int offset, int len)
 {
     if (!ctx)
index 0da718a..188c2cb 100644 (file)
@@ -112,6 +112,7 @@ Ecore_IMF_Autocapital_Type wsc_context_autocapital_type_get (weescim *ctx);
 Ecore_IMF_Input_Panel_Lang wsc_context_input_panel_language_get (weescim *ctx);
 bool wsc_context_input_panel_password_mode_get (weescim *ctx);
 Ecore_IMF_Input_Hints wsc_context_input_hint_get (weescim *ctx);
+Eina_Bool wsc_context_prediction_allow_get (weescim *ctx);
 void wsc_context_commit_preedit_string(weescim *ctx);
 void wsc_context_commit_string(weescim *ctx, const char *str);
 void wsc_context_send_preedit_string(weescim *ctx);
index c7188d5..7e5b739 100644 (file)
 #include "isf_wsc_control.h"
 #include "ise_context.h"
 
+#ifdef LOG_TAG
+# undef LOG_TAG
+#endif
+#define LOG_TAG                                         "ISF_WSC_EFL"
+
 using namespace scim;
 
 /* IM control related variables */
@@ -112,7 +117,7 @@ void isf_wsc_context_input_panel_show (WSCContextISF* ctx)
     iseContext.layout_variation = 0;
 
     /* set prediction allow */
-    iseContext.prediction_allow = EINA_TRUE;
+    iseContext.prediction_allow = wsc_context_prediction_allow_get (ctx->ctx);
 
     if (iseContext.layout == ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD)
         iseContext.password_mode = EINA_TRUE;
old mode 100755 (executable)
new mode 100644 (file)