Fix segfault when deleting a background while this dialog is open.

Add file monitor event for deleting a background while config dialog is open
to remove it from the list.


SVN revision: 21960
This commit is contained in:
Christopher Michael 2006-04-08 21:56:03 +00:00
parent a2bcdfcbdc
commit 40d5f91804
1 changed files with 6 additions and 1 deletions

View File

@ -466,6 +466,7 @@ _bg_file_added(void *data, Ecore_File_Monitor *monitor, Ecore_File_Event event,
Evas *evas;
Evas_Object *il, *ic;
char *file;
char *noext;
cfdata = data;
if (!cfdata) return;
@ -490,7 +491,11 @@ _bg_file_added(void *data, Ecore_File_Monitor *monitor, Ecore_File_Event event,
e_widget_ilist_append(il, ic, ecore_file_strip_ext(file), _ilist_cb_bg_selected, cfd, (char *)path);
}
}
free(file);
else if (event == ECORE_FILE_EVENT_DELETED_FILE)
{
noext = ecore_file_strip_ext(file);
e_widget_ilist_remove_label(il, noext);
}
}
static int