entry: Show/Hide guide text immediately 97/68097/4
authorYoungbok Shin <youngb.shin@samsung.com>
Mon, 2 May 2016 08:13:56 +0000 (17:13 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 22 Jun 2016 07:44:43 +0000 (00:44 -0700)
@tizen_fix

Change-Id: I91436f77e78747f407c6ebd9546f1ece2b9e55cf

src/lib/elm_entry.c

index c00bcc3..564ba69 100644 (file)
@@ -956,10 +956,23 @@ _elm_entry_guide_update(Evas_Object *obj,
 {
    ELM_ENTRY_DATA_GET(obj, sd);
 
+   /* TIZEN_ONLY(20160502): Show/Hide guide text immediately.
    if ((has_text) && (!sd->has_text))
      edje_object_signal_emit(sd->entry_edje, "elm,guide,disabled", "elm");
    else if ((!has_text) && (sd->has_text))
      edje_object_signal_emit(sd->entry_edje, "elm,guide,enabled", "elm");
+    */
+   if ((has_text) && (!sd->has_text))
+     {
+        edje_object_signal_emit(sd->entry_edje, "elm,guide,disabled", "elm");
+        edje_object_message_signal_process(sd->entry_edje);
+     }
+   else if ((!has_text) && (sd->has_text))
+     {
+        edje_object_signal_emit(sd->entry_edje, "elm,guide,enabled", "elm");
+        edje_object_message_signal_process(sd->entry_edje);
+     }
+   /* END */
 
    sd->has_text = has_text;
 }
@@ -4114,6 +4127,17 @@ _elm_entry_elm_layout_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, co
      }
 
    len = strlen(entry);
+
+   /* TIZEN_ONLY(20160502): Show/Hide guide text immediately.
+    * It is moved here for preventing to process "entry,changed" signal.
+    * Since, edje_object_message_signal_process() is called in _elm_entry_guide_update(),
+    * it causes size calculation issues in other widgets: elm_spinner. */
+   if (len > 0)
+     _elm_entry_guide_update(obj, EINA_TRUE);
+   else
+     _elm_entry_guide_update(obj, EINA_FALSE);
+   /* END */
+
    if (sd->append_text_left)
      {
         free(sd->append_text_left);
@@ -4124,10 +4148,12 @@ _elm_entry_elm_layout_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, co
    edje_object_part_text_set(sd->entry_edje, "elm.text", "");
    _entry_text_append(obj, entry, EINA_TRUE);
 
+   /* TIZEN_ONLY(20160502): Show/Hide guide text immediately.
    if (len > 0)
      _elm_entry_guide_update(obj, EINA_TRUE);
    else
      _elm_entry_guide_update(obj, EINA_FALSE);
+    */
 
    evas_event_thaw(evas_object_evas_get(obj));
    evas_event_thaw_eval(evas_object_evas_get(obj));