From: hermet Date: Mon, 7 Nov 2011 10:18:26 +0000 (+0000) Subject: elementary/naviframe - it refered an incorrect object to delete a callback fucntion X-Git-Tag: REL_F_I9500_20120323_1~17^2~1374 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b2ab81bdca3c6436357060b2a92901b3df484d8;p=framework%2Fuifw%2Felementary.git elementary/naviframe - it refered an incorrect object to delete a callback fucntion git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@64863 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index a2825b6..8ec3c97 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -572,32 +572,34 @@ _title_content_set(Elm_Naviframe_Item *it, EINA_INLIST_GET(pair)); } - if ((pair->content) && (pair->content != content)) - evas_object_del(pair->content); + if (pair->content == content) return; - if (!content) + if (pair->content) { - snprintf(buf, sizeof(buf), "elm,state,%s,hide", part); - edje_object_signal_emit(VIEW(it), buf, "elm"); - pair->content = NULL; - return; + evas_object_event_callback_del(pair->content, + EVAS_CALLBACK_DEL, + _title_content_del); + evas_object_del(pair->content); } - - if (pair->content != content) + if (content) { elm_widget_sub_object_add(WIDGET(it), content); evas_object_event_callback_add(content, EVAS_CALLBACK_DEL, _title_content_del, pair); + edje_object_part_swallow(VIEW(it), part, content); + snprintf(buf, sizeof(buf), "elm,state,%s,show", part); + edje_object_signal_emit(VIEW(it), buf, "elm"); + pair->content = content; + _item_sizing_eval(it); + } + else + { + snprintf(buf, sizeof(buf), "elm,state,%s,hide", part); + edje_object_signal_emit(VIEW(it), buf, "elm"); + pair->content = NULL; } - - pair->content = content; - - edje_object_part_swallow(VIEW(it), part, content); - snprintf(buf, sizeof(buf), "elm,state,%s,show", part); - edje_object_signal_emit(VIEW(it), buf, "elm"); - _item_sizing_eval(it); } static void