summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cpmichael1@comcast.net>2005-12-27 22:57:41 +0000
committerChristopher Michael <cpmichael1@comcast.net>2005-12-27 22:57:41 +0000
commit577afaae8aa39a7675e8708d0b7b4c984c5344d8 (patch)
treebc84c1d3a3fdfb0b1ac1dbf9e06283aedf0b1a32
parentd4663c2374d479fd671f5844561fa2c642b7814f (diff)
Fix remove by label
SVN revision: 19326
-rw-r--r--src/bin/e_ilist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/e_ilist.c b/src/bin/e_ilist.c
index e69a19795..984a9a933 100644
--- a/src/bin/e_ilist.c
+++ b/src/bin/e_ilist.c
@@ -262,22 +262,24 @@ void
262e_ilist_remove_label(Evas_Object *obj, char *label) 262e_ilist_remove_label(Evas_Object *obj, char *label)
263{ 263{
264 E_Smart_Item *si; 264 E_Smart_Item *si;
265 Evas_List *l;
266 int i;
265 char *t; 267 char *t;
266 268
267 API_ENTRY return; 269 API_ENTRY return;
268 if (!sd->items) return; 270 if (!sd->items) return;
269 if (!label) return; 271 if (!label) return;
270 while (sd->items) 272 for (i = 0, l = sd->items; l; l = l->next, i++)
271 { 273 {
272 si = sd->items->data; 274 si = l->data;
273 if (si) 275 if (si)
274 { 276 {
275 t = edje_object_part_text_get(si->base_obj, "label"); 277 t = edje_object_part_text_get(si->base_obj, "label");
276 if (!strcmp(t, label)) 278 if (!strcmp(t, label))
277 { 279 {
278 sd->items = evas_list_remove(sd->items, si);
279 if (si->icon_obj) evas_object_del(si->icon_obj); 280 if (si->icon_obj) evas_object_del(si->icon_obj);
280 evas_object_del(si->base_obj); 281 evas_object_del(si->base_obj);
282 sd->items = evas_list_remove(sd->items, si);
281 free(si); 283 free(si);
282 break; 284 break;
283 } 285 }