Revert "[multibuttonentry] trimmed focus of box's children"
authorBora Hwang <bora1.hwang@samsung.com>
Tue, 25 Jun 2013 04:23:21 +0000 (13:23 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Thu, 27 Jun 2013 04:07:41 +0000 (13:07 +0900)
This reverts commit 732cb34d34c0a58a9950864668ca37e9aa584396

Change-Id: I3cc76be1b43848ede8313d19b1ed9ad96f4864d1

src/lib/elc_multibuttonentry.c

index 2778e13..0cfd756 100644 (file)
@@ -232,8 +232,8 @@ _guide_set(Evas_Object *obj,
      {
         if (sd->editable)
           {
-             evas_object_hide(sd->entry);
              elm_box_unpack(sd->box, sd->entry);
+             evas_object_hide(sd->entry);
           }
 
         elm_box_pack_end(sd->box, sd->guide);
@@ -264,8 +264,8 @@ _label_set(Evas_Object *obj,
      }
    else if (!strlen(text) && _label_packed(obj))
      {
-        evas_object_hide(sd->label);
         elm_box_unpack(sd->box, sd->label);
+        evas_object_hide(sd->label);
      }
 
    // ACCESS
@@ -463,15 +463,17 @@ _item_adding_effect_add(Evas_Object *obj,
                }
              else
                {
-                  evas_object_hide(VIEW(last_it));
                   elm_box_unpack(sd->box, VIEW(last_it));
+                  evas_object_hide(VIEW(last_it));
                }
           }
 
         if (sd->editable)
           {
-             evas_object_hide(sd->entry);
+             if (elm_object_focus_get(sd->entry))
+               elm_object_focus_set(sd->entry, EINA_FALSE);
              elm_box_unpack(sd->box, sd->entry);
+             evas_object_hide(sd->entry);
              if (elm_object_focus_get(WIDGET(it)))
                elm_entry_input_panel_show(sd->entry);
           }
@@ -648,15 +650,17 @@ _item_deleting_effect_add(Evas_Object *obj,
                elm_box_unpack(sd->box, VIEW(it));
              else
                {
-                  evas_object_hide(VIEW(last_it));
                   elm_box_unpack(sd->box, VIEW(last_it));
+                  evas_object_hide(VIEW(last_it));
                }
           }
 
         if (sd->editable)
           {
-             evas_object_hide(sd->entry);
+             if (elm_object_focus_get(sd->entry))
+               elm_object_focus_set(sd->entry, EINA_FALSE);
              elm_box_unpack(sd->box, sd->entry);
+             evas_object_hide(sd->entry);
              if (elm_object_focus_get(WIDGET(it)))
                elm_entry_input_panel_show(sd->entry);
           }
@@ -951,14 +955,16 @@ _layout_shrink(Evas_Object *obj,
                        evas_object_data_set(VIEW(it), "effect_rect", NULL);
                     }
 #endif
-                  evas_object_hide(VIEW(it));
                   elm_box_unpack(sd->box, VIEW(it));
+                  evas_object_hide(VIEW(it));
                }
 
              if (sd->editable)
                {
-                  evas_object_hide(sd->entry);
+                  if (elm_object_focus_get(sd->entry))
+                    elm_object_focus_set(sd->entry, EINA_FALSE);
                   elm_box_unpack(sd->box, sd->entry);
+                  evas_object_hide(sd->entry);
                }
           }
         else
@@ -1002,8 +1008,8 @@ _layout_shrink(Evas_Object *obj,
                {
                   if (child != sd->label)
                     {
-                       evas_object_hide(child);
                        elm_box_unpack(sd->box, child);
+                       evas_object_hide(child);
                     }
                }
 
@@ -1051,8 +1057,10 @@ _layout_shrink(Evas_Object *obj,
                   linew += mnw;
                   if (linew > (w * (2 / 3)))
                     {
-                       evas_object_hide(sd->entry);
+                       if (elm_object_focus_get(sd->entry))
+                         elm_object_focus_set(sd->entry, EINA_FALSE);
                        elm_box_unpack(sd->box, sd->entry);
+                       evas_object_hide(sd->entry);
                        sd->expanded_state = EINA_FALSE;
                     }
                }
@@ -1086,8 +1094,8 @@ _layout_shrink(Evas_Object *obj,
                {
                   if (child != sd->label)
                     {
-                       evas_object_hide(child);
                        elm_box_unpack(sd->box, child);
+                       evas_object_hide(child);
                     }
                }
 
@@ -1670,8 +1678,8 @@ _item_del_pre_hook(Elm_Object_Item *it)
      {
         if (sd->editable)
           {
-             evas_object_hide(sd->entry);
              elm_box_unpack(sd->box, sd->entry);
+             evas_object_hide(sd->entry);
           }
 
         elm_box_pack_end(sd->box, sd->guide);
@@ -2042,8 +2050,8 @@ _elm_multibuttonentry_smart_on_focus(Evas_Object *obj)
 
         if (sd->guide && _guide_packed(obj))
           {
-             evas_object_hide(sd->guide);
              elm_box_unpack(sd->box, sd->guide);
+             evas_object_hide(sd->guide);
 
              if (sd->editable)
                {
@@ -2069,8 +2077,8 @@ _elm_multibuttonentry_smart_on_focus(Evas_Object *obj)
           {
              if (sd->editable)
                {
-                  evas_object_hide(sd->entry);
                   elm_box_unpack(sd->box, sd->entry);
+                  evas_object_hide(sd->entry);
                }
 
              elm_box_pack_end(sd->box, sd->guide);
@@ -2336,8 +2344,8 @@ _elm_multibuttonentry_smart_activate(Evas_Object *obj, Elm_Activate act)
      {
         if (sd->guide && _guide_packed(obj))
           {
-             evas_object_hide(sd->guide);
              elm_box_unpack(sd->box, sd->guide);
+             evas_object_hide(sd->guide);
 
              if (sd->editable)
                {
@@ -2485,8 +2493,8 @@ elm_multibuttonentry_editable_set(Evas_Object *obj,
      {
         if (!(sd->guide && _guide_packed(obj)))
           {
-             evas_object_hide(sd->entry);
              elm_box_unpack(sd->box, sd->entry);
+             evas_object_hide(sd->entry);
           }
 
         if (!elm_object_focus_get(obj))
@@ -2519,8 +2527,8 @@ elm_multibuttonentry_item_prepend(Evas_Object *obj,
    // if guide text was shown, hide it
    if (sd->guide && _guide_packed(obj))
      {
-        evas_object_hide(sd->guide);
         elm_box_unpack(sd->box, sd->guide);
+        evas_object_hide(sd->guide);
 
         if (sd->editable)
           {
@@ -2589,8 +2597,8 @@ elm_multibuttonentry_item_append(Evas_Object *obj,
    // if guide text was shown, hide it
    if (sd->guide && _guide_packed(obj))
      {
-        evas_object_hide(sd->guide);
         elm_box_unpack(sd->box, sd->guide);
+        evas_object_hide(sd->guide);
 
         if (sd->editable)
           {
@@ -2911,8 +2919,8 @@ elm_multibuttonentry_clear(Evas_Object *obj)
      {
         if (sd->editable)
           {
-             evas_object_hide(sd->entry);
              elm_box_unpack(sd->box, sd->entry);
+             evas_object_hide(sd->entry);
           }
 
         elm_box_pack_end(sd->box, sd->guide);