Clear the filelist when done, fix a memory leak when deleting objects from the custom filelist.
This commit is contained in:
parent
17a787c6a6
commit
883498c9b1
@ -261,6 +261,10 @@ void
|
||||
ecdb_burn_data_cleanup(void)
|
||||
{
|
||||
Evas_Object *swallow;
|
||||
Ewl_Widget *filelist;
|
||||
Ecdb_Source *src;
|
||||
int i;
|
||||
|
||||
const char *ids[] = {"ecdb/burn_data/return", "ecdb/burn_data/begin",
|
||||
"ecdb/burn_data/file", "ecdb/burn_data/drive"
|
||||
"ecdb/burn_data/speed"};
|
||||
@ -269,5 +273,16 @@ ecdb_burn_data_cleanup(void)
|
||||
edje_object_part_text_set(swallow, "progress_text", "Burn Complete!");
|
||||
ecdb_gui_controls_enable(ids, 5);
|
||||
edje_object_signal_emit(swallow, "ecdb,burn_data,done", "ecdb");
|
||||
|
||||
filelist = ewl_widget_name_find("ecdb/burn_data/filelist");
|
||||
src = ewl_widget_data_get(filelist, "source");
|
||||
while (src->parent)
|
||||
src = src->parent;
|
||||
|
||||
for (i = 0; i < src->num_children; i++)
|
||||
{
|
||||
ecdb_source_child_remove(src, src->children[i]);
|
||||
ecdb_source_destroy(src->children[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,6 +306,7 @@ ecdb_custom_filelist_cb_key_down(Ewl_Widget *w, void *ev, void *data)
|
||||
if (!strcmp(child->dst, file))
|
||||
{
|
||||
ecdb_source_child_remove(parent, child);
|
||||
ecdb_source_destroy(child);
|
||||
ecdb_custom_filelist_directory_set(fl, parent);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user