diff options
Diffstat (limited to '')
-rw-r--r-- | src/libraries/winFang.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libraries/winFang.c b/src/libraries/winFang.c index b6ceee9..bfd9327 100644 --- a/src/libraries/winFang.c +++ b/src/libraries/winFang.c | |||
@@ -369,28 +369,29 @@ void winFangCalcMinSize(winFang *win) | |||
369 | 369 | ||
370 | void winFangDel(winFang *win) | 370 | void winFangDel(winFang *win) |
371 | { | 371 | { |
372 | winFang *wf; | 372 | winFang *wf, *wf2; |
373 | Widget *wid; | 373 | Widget *wid, *wid2; |
374 | 374 | ||
375 | if (!win) return; | 375 | if (!win) return; |
376 | 376 | ||
377 | if (win->bg) eo_unref(win->bg); | 377 | if (win->bg) eo_unref(win->bg); |
378 | if (win->grid) eo_unref(win->grid); | 378 | if (win->grid) eo_unref(win->grid); |
379 | if (win->layout) eo_unref(win->layout); | 379 | if (win->layout) eo_unref(win->layout); |
380 | EINA_CLIST_FOR_EACH_ENTRY(wf, &win->winFangs, winFang, node) | 380 | EINA_CLIST_FOR_EACH_ENTRY_SAFE(wf, wf2, &win->winFangs, winFang, node) |
381 | { | 381 | { |
382 | winFangDel(wf); | 382 | winFangDel(wf); |
383 | } | 383 | } |
384 | 384 | ||
385 | // Elm will delete our widgets, but if we are using eo, we need to unref them. | 385 | // Elm will delete our widgets, but if we are using eo, we need to unref them. |
386 | EINA_CLIST_FOR_EACH_ENTRY(wid, &win->widgets, Widget, node) | 386 | EINA_CLIST_FOR_EACH_ENTRY_SAFE(wid, wid2, &win->widgets, Widget, node) |
387 | { | 387 | { |
388 | if (wid->on_del) wid->on_del(wid, wid->obj, NULL); | 388 | if (wid->on_del) wid->on_del(wid, wid->obj, NULL); |
389 | widgetDel(wid); | 389 | widgetDel(wid); |
390 | eo_unref(wid->obj); | ||
391 | } | 390 | } |
392 | if (win->on_del) win->on_del(win, win->win, NULL); | 391 | if (win->on_del) win->on_del(win, win->win, NULL); |
393 | evas_object_del(win->win); | 392 | evas_object_del(win->win); |
393 | free(win->module); | ||
394 | free(win); | ||
394 | } | 395 | } |
395 | 396 | ||
396 | 397 | ||
@@ -483,10 +484,14 @@ void widgetDel(Widget *wid) | |||
483 | { | 484 | { |
484 | if (wid) | 485 | if (wid) |
485 | { | 486 | { |
487 | free(wid->action); | ||
488 | free(wid->label); | ||
486 | // TODO - This is to work around a bug in Elm entry, remove it when the bug is fixed. | 489 | // TODO - This is to work around a bug in Elm entry, remove it when the bug is fixed. |
487 | // The bug is that editable entry widgets cause the app to hang on exit. | 490 | // The bug is that editable entry widgets cause the app to hang on exit. |
488 | if (strcmp(WT_ENTRY, wid->type) == 0) | 491 | if (strcmp(WT_ENTRY, wid->type) == 0) |
489 | elm_entry_editable_set(wid->obj, EINA_FALSE); | 492 | elm_entry_editable_set(wid->obj, EINA_FALSE); |
493 | eo_unref(wid->obj); | ||
494 | free(wid); | ||
490 | } | 495 | } |
491 | } | 496 | } |
492 | 497 | ||