summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-11-22 15:23:58 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-11-22 15:23:58 +0000
commitbdeebcdf6fde5c3c9c9505a4b6205c26208aee16 (patch)
tree8a3878f278fe87cc788c342ad7501adfc19007c0
parenta9a593f7bb0297080c5fd7e7fdb993ae6833c9d8 (diff)
elementary/naviframe - backport 79544
SVN revision: 79546
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/lib/elc_naviframe.c52
3 files changed, 40 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index d7321f85f..385612064 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -535,3 +535,7 @@
535 535
536 * Lets remove contents regardless of the preseve_on_set if naviframe is 536 * Lets remove contents regardless of the preseve_on_set if naviframe is
537 deleted. 537 deleted.
538
5392012-11-22 Shilpa Sigh (shilpa.singh@samsung.com)
540
541 * Clear the title contents when naviframe item is deleted.
diff --git a/NEWS b/NEWS
index 5f8b18a4f..db3f741f5 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Fixes:
12 * Fix update the min size hint on elm_label after a text set 12 * Fix update the min size hint on elm_label after a text set
13 * Fix flip widget who show the two face at same time 13 * Fix flip widget who show the two face at same time
14 * Fix the naviframe to delete contents which are preserved_on set if the naviframe is deleted. 14 * Fix the naviframe to delete contents which are preserved_on set if the naviframe is deleted.
15 * Fix the naviframe to clear the title contents when it's item is deleted.
15 16
16 17
17Changes since Elementary 1.7.0: 18Changes since Elementary 1.7.0:
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
index cd935af40..845546255 100644
--- a/src/lib/elc_naviframe.c
+++ b/src/lib/elc_naviframe.c
@@ -70,8 +70,29 @@ _item_title_icon_del_cb(void *data,
70} 70}
71 71
72static void 72static void
73_title_content_del(void *data,
74 Evas *e __UNUSED__,
75 Evas_Object *obj __UNUSED__,
76 void *event_info __UNUSED__)
77{
78 char buf[1024];
79 Elm_Naviframe_Content_Item_Pair *pair = data;
80 Elm_Naviframe_Item *it = pair->it;
81 snprintf(buf, sizeof(buf), "elm,state,%s,hide", pair->part);
82 edje_object_signal_emit(VIEW(it), buf, "elm");
83 it->content_list = eina_inlist_remove(it->content_list,
84 EINA_INLIST_GET(pair));
85 eina_stringshare_del(pair->part);
86 free(pair);
87}
88
89static void
73_item_free(Elm_Naviframe_Item *it) 90_item_free(Elm_Naviframe_Item *it)
74{ 91{
92 Eina_Inlist *l;
93 Elm_Naviframe_Content_Item_Pair *content_pair;
94 Evas_Object *title_content;
95
75 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd); 96 ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
76 97
77 eina_stringshare_del(it->style); 98 eina_stringshare_del(it->style);
@@ -84,6 +105,20 @@ _item_free(Elm_Naviframe_Item *it)
84 evas_object_del(it->title_next_btn); 105 evas_object_del(it->title_next_btn);
85 if (it->title_icon) evas_object_del(it->title_icon); 106 if (it->title_icon) evas_object_del(it->title_icon);
86 107
108 EINA_INLIST_FOREACH_SAFE(it->content_list, l, content_pair)
109 {
110 title_content = edje_object_part_swallow_get(VIEW(it), content_pair->part);
111 if (title_content)
112 {
113 evas_object_event_callback_del(title_content,
114 EVAS_CALLBACK_DEL,
115 _title_content_del);
116 evas_object_del(title_content);
117 }
118 eina_stringshare_del(content_pair->part);
119 free(content_pair);
120 }
121
87 if (it->content) 122 if (it->content)
88 { 123 {
89 if ((sd->preserve) && (!sd->on_deletion)) 124 if ((sd->preserve) && (!sd->on_deletion))
@@ -517,23 +552,6 @@ _part_aliasing_eval(const char **part)
517} 552}
518 553
519static void 554static void
520_title_content_del(void *data,
521 Evas *e __UNUSED__,
522 Evas_Object *obj __UNUSED__,
523 void *event_info __UNUSED__)
524{
525 char buf[1024];
526 Elm_Naviframe_Content_Item_Pair *pair = data;
527 Elm_Naviframe_Item *it = pair->it;
528 snprintf(buf, sizeof(buf), "elm,state,%s,hide", pair->part);
529 edje_object_signal_emit(VIEW(it), buf, "elm");
530 it->content_list = eina_inlist_remove(it->content_list,
531 EINA_INLIST_GET(pair));
532 eina_stringshare_del(pair->part);
533 free(pair);
534}
535
536static void
537_title_content_set(Elm_Naviframe_Item *it, 555_title_content_set(Elm_Naviframe_Item *it,
538 const char *part, 556 const char *part,
539 Evas_Object *content) 557 Evas_Object *content)