[Merge conflict resolved]
authorShilpa Singh <shilpa.singh@samsung.com>
Wed, 28 Sep 2011 10:27:37 +0000 (19:27 +0900)
committerShilpa Singh <shilpa.singh@samsung.com>
Thu, 29 Sep 2011 02:05:13 +0000 (11:05 +0900)
[elc_naviframe]: Crash happens when NULL is set in
elm_object_item_text_part_set for title, and review issue show signal
sent always whether label present or not fixed.

Change-Id: I00d06e0777cc9deab6f3dab060b08ee2c12a6bc5

src/lib/elc_naviframe.c

index 66f0fe4..38ee986 100644 (file)
@@ -189,7 +189,7 @@ _item_text_set_hook(Elm_Object_Item *it,
      {
         if (!strcmp(buf, pair->part))
           {
-             if (pair->text)
+             if ((pair->text) && label)
                {
                   if (!strcmp(pair->text, label))
                     return;
@@ -213,12 +213,16 @@ _item_text_set_hook(Elm_Object_Item *it,
    eina_stringshare_replace(&pair->text, label);
    edje_object_part_text_set(navi_it->base.view, buf, label);
 
-   snprintf(buf, sizeof(buf), "elm,state,%s,show", buf);
-
    if (label)
-     edje_object_signal_emit(navi_it->base.view, buf, "elm");
+     {
+        snprintf(buf, sizeof(buf), "elm,state,%s,show", buf);
+        edje_object_signal_emit(navi_it->base.view, buf, "elm");
+     }
    else
-     edje_object_signal_emit(navi_it->base.view, buf, "elm");
+     {
+        snprintf(buf, sizeof(buf), "elm,state,%s,hide", buf);
+        edje_object_signal_emit(navi_it->base.view, buf, "elm");
+     }
 
    _item_sizing_eval(navi_it);
 }