jihoon pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=be7e8f65137e37b781eb4b6b5323360813a79559

commit be7e8f65137e37b781eb4b6b5323360813a79559
Author: Jihoon Kim <[email protected]>
Date:   Thu Dec 8 15:54:48 2016 +0900

    entry: set autocapital mode according to the layout
---
 src/lib/elementary/elm_entry.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index db7493c..812b140 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -5116,6 +5116,18 @@ _elm_entry_input_panel_layout_set(Eo *obj EINA_UNUSED, 
Elm_Entry_Data *sd, Elm_I
    edje_object_part_text_input_panel_layout_set
      (sd->entry_edje, "elm.text", (Edje_Input_Panel_Layout)layout);
 
+   switch (layout)
+     {
+      case ELM_INPUT_PANEL_LAYOUT_URL:
+      case ELM_INPUT_PANEL_LAYOUT_EMAIL:
+      case ELM_INPUT_PANEL_LAYOUT_PASSWORD:
+         elm_entry_autocapital_type_set(obj, ELM_AUTOCAPITAL_TYPE_NONE);
+         break;
+      default:
+         elm_entry_autocapital_type_set(obj, ELM_AUTOCAPITAL_TYPE_SENTENCE);
+         break;
+     }
+
    if (layout == ELM_INPUT_PANEL_LAYOUT_PASSWORD)
      elm_entry_input_hint_set(obj, ((sd->input_hints & 
~ELM_INPUT_HINT_AUTO_COMPLETE) | ELM_INPUT_HINT_SENSITIVE_DATA));
    else if (layout == ELM_INPUT_PANEL_LAYOUT_TERMINAL)
@@ -5135,6 +5147,10 @@ _elm_entry_input_panel_layout_variation_set(Eo *obj 
EINA_UNUSED, Elm_Entry_Data
 
    edje_object_part_text_input_panel_layout_variation_set
      (sd->entry_edje, "elm.text", variation);
+
+   if (sd->input_panel_layout == ELM_INPUT_PANEL_LAYOUT_NORMAL &&
+       variation == ELM_INPUT_PANEL_LAYOUT_NORMAL_VARIATION_PERSON_NAME)
+     elm_entry_autocapital_type_set(obj, ELM_AUTOCAPITAL_TYPE_WORD);
 }
 
 EOLIAN static int

-- 


Reply via email to