elementary/naviframe - Clear the title contents when it's naviframe item is deleted.

Signed-Off-By: Shilpa Singh(shilap.singh@samsung.com)



SVN revision: 79544
This commit is contained in:
ChunEon Park 2012-11-22 15:15:26 +00:00
parent f003597989
commit ebdd689cec
3 changed files with 38 additions and 17 deletions

View File

@ -702,4 +702,6 @@
* Lets remove contents regardless of the preseve_on_set if naviframe is
deleted.
2012-11-22 Shilpa Sigh (shilpa.singh@samsung.com)
* Clear the title contents when naviframe item is deleted.

View File

@ -61,6 +61,7 @@ Fixes:
* Fix update the min size hint on elm_label after a text set
* Fix flip widget who show the two face at same time
* Fix the naviframe to delete contents which are preserved_on set if the naviframe is deleted.
* Fix the naviframe to clear the title contents when it's item is deleted.
Removals:

View File

@ -69,9 +69,30 @@ _item_title_icon_del_cb(void *data,
edje_object_signal_emit(VIEW(it), "elm,state,icon,hide", "elm");
}
static void
_title_content_del(void *data,
Evas *e __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
char buf[1024];
Elm_Naviframe_Content_Item_Pair *pair = data;
Elm_Naviframe_Item *it = pair->it;
snprintf(buf, sizeof(buf), "elm,state,%s,hide", pair->part);
edje_object_signal_emit(VIEW(it), buf, "elm");
it->content_list = eina_inlist_remove(it->content_list,
EINA_INLIST_GET(pair));
eina_stringshare_del(pair->part);
free(pair);
}
static void
_item_free(Elm_Naviframe_Item *it)
{
Eina_Inlist *l;
Elm_Naviframe_Content_Item_Pair *content_pair;
Evas_Object *title_content;
ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
eina_stringshare_del(it->style);
@ -84,6 +105,20 @@ _item_free(Elm_Naviframe_Item *it)
evas_object_del(it->title_next_btn);
if (it->title_icon) evas_object_del(it->title_icon);
EINA_INLIST_FOREACH_SAFE(it->content_list, l, content_pair)
{
title_content = edje_object_part_swallow_get(VIEW(it), content_pair->part);
if (title_content)
{
evas_object_event_callback_del(title_content,
EVAS_CALLBACK_DEL,
_title_content_del);
evas_object_del(title_content);
}
eina_stringshare_del(content_pair->part);
free(content_pair);
}
if (it->content)
{
if ((sd->preserve) && (!sd->on_deletion))
@ -580,23 +615,6 @@ _part_aliasing_eval(const char **part)
*part = ICON_PART;
}
static void
_title_content_del(void *data,
Evas *e __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
char buf[1024];
Elm_Naviframe_Content_Item_Pair *pair = data;
Elm_Naviframe_Item *it = pair->it;
snprintf(buf, sizeof(buf), "elm,state,%s,hide", pair->part);
edje_object_signal_emit(VIEW(it), buf, "elm");
it->content_list = eina_inlist_remove(it->content_list,
EINA_INLIST_GET(pair));
eina_stringshare_del(pair->part);
free(pair);
}
static void
_title_content_set(Elm_Naviframe_Item *it,
const char *part,