summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2011-10-25 00:50:54 +0000
committerChunEon Park <hermet@hermet.pe.kr>2011-10-25 00:50:54 +0000
commitda7bf528c95d54f84c695977593de07a8f82854c (patch)
treef3bdb42a9f587d21feef7b9cf133eab379b6288d /legacy
parent999c7e6ef7d9d87f60c611de7269b1a925625919 (diff)
elementary/naviframe - fixed bad usage of eina_inlist.
removed the inlist node in while loop instead of REVERSE_FOREACH. it corrupted the list. SVN revision: 64369
Diffstat (limited to 'legacy')
-rw-r--r--legacy/elementary/src/lib/elc_naviframe.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/legacy/elementary/src/lib/elc_naviframe.c b/legacy/elementary/src/lib/elc_naviframe.c
index 8c2bfa5b8e..9231b8a7c5 100644
--- a/legacy/elementary/src/lib/elc_naviframe.c
+++ b/legacy/elementary/src/lib/elc_naviframe.c
@@ -147,10 +147,12 @@ _del_hook(Evas_Object *obj)
147 wd = elm_widget_data_get(obj); 147 wd = elm_widget_data_get(obj);
148 if (!wd) return; 148 if (!wd) return;
149 149
150 EINA_INLIST_REVERSE_FOREACH(wd->stack, it) 150 while (wd->stack->last)
151 { 151 {
152 wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(it)); 152 it = EINA_INLIST_CONTAINER_GET(wd->stack->last, Elm_Naviframe_Item);
153 wd->stack = eina_inlist_remove(wd->stack, wd->stack->last);
153 _item_del(it); 154 _item_del(it);
155 if (!wd->stack) break;
154 } 156 }
155 free(wd); 157 free(wd);
156} 158}
@@ -180,7 +182,6 @@ _theme_hook(Evas_Object *obj)
180 _mirrored_set(obj, elm_widget_mirrored_get(obj)); 182 _mirrored_set(obj, elm_widget_mirrored_get(obj));
181 183
182 evas_object_hide(wd->rect); 184 evas_object_hide(wd->rect);
183
184} 185}
185 186
186static void _emit_hook(Evas_Object *obj, 187static void _emit_hook(Evas_Object *obj,
@@ -695,25 +696,28 @@ _item_del(Elm_Naviframe_Item *it)
695 if ((it->content) && (!wd->preserve)) 696 if ((it->content) && (!wd->preserve))
696 evas_object_del(it->content); 697 evas_object_del(it->content);
697 698
698 EINA_INLIST_REVERSE_FOREACH(it->content_list, content_pair) 699 while (it->content_list)
699 { 700 {
701 content_pair = EINA_INLIST_CONTAINER_GET(it->content_list,
702 Elm_Naviframe_Content_Item_Pair);
700 evas_object_event_callback_del(content_pair->content, 703 evas_object_event_callback_del(content_pair->content,
701 EVAS_CALLBACK_DEL, 704 EVAS_CALLBACK_DEL,
702 _title_content_del); 705 _title_content_del);
703 evas_object_del(content_pair->content); 706 evas_object_del(content_pair->content);
704 eina_stringshare_del(content_pair->part); 707 eina_stringshare_del(content_pair->part);
705 it->content_list = 708 it->content_list = eina_inlist_remove(it->content_list,
706 eina_inlist_remove(it->content_list, 709 it->content_list);
707 EINA_INLIST_GET(content_pair));
708 free(content_pair); 710 free(content_pair);
709 } 711 }
710 712
711 EINA_INLIST_REVERSE_FOREACH(it->text_list, text_pair) 713 while (it->text_list)
712 { 714 {
715 text_pair = EINA_INLIST_CONTAINER_GET(it->text_list,
716 Elm_Naviframe_Text_Item_Pair);
713 eina_stringshare_del(text_pair->part); 717 eina_stringshare_del(text_pair->part);
714 eina_stringshare_del(text_pair->text); 718 eina_stringshare_del(text_pair->text);
715 it->text_list = eina_inlist_remove(it->text_list, 719 it->text_list = eina_inlist_remove(it->text_list,
716 EINA_INLIST_GET(text_pair)); 720 it->text_list);
717 free(text_pair); 721 free(text_pair);
718 } 722 }
719 723