layout: fix "elm,state,text,hidden" signal never be emitted 78/142878/2
authorJinYong Park <j4939.park@samsung.com>
Mon, 7 Aug 2017 11:51:40 +0000 (20:51 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 7 Aug 2017 11:57:15 +0000 (11:57 +0000)
In _elm_layout_text_set function, text_signal_emit is called.
But in that case, check text whether it is null or not null before call signal_emit.
So "text" is not null always, and text_signal_emit's parameter "visible" is also always EINA_TRUE.

opensource link : https://phab.enlightenment.org/D5049

Change-Id: I0decfc0144c7e13e4706ca90aa38824921ee4673
Signed-off-by: Jinyong Park <j4939.park@samsung.com>
src/lib/elm_layout.c

index 15d9fd09793aa7ba2773709774c861fdb68f7199..337eb7f2e9fa58b24f7ef8cc87efc762c2b915db 100644 (file)
@@ -1208,6 +1208,7 @@ _elm_layout_text_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, const
           {
              if (!text)
                {
+                  _text_signal_emit(sd, sub_d, EINA_FALSE);
                   eina_stringshare_del(sub_d->part);
                   eina_stringshare_del(sub_d->p.text.text);
                   free(sub_d);
@@ -1239,7 +1240,7 @@ _elm_layout_text_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, const
 
    eina_stringshare_replace(&sub_d->p.text.text, text);
 
-   _text_signal_emit(sd, sub_d, !!text);
+   _text_signal_emit(sd, sub_d, EINA_TRUE);
 
    eo_do(obj, elm_obj_layout_sizing_eval());