Fix some stuff, including sort when data is dragged in

This commit is contained in:
Jaime Thomas
2008-06-23 01:56:25 +00:00
parent 5ade76e2f8
commit 309efa4298
2 changed files with 21 additions and 20 deletions

View File

@@ -234,23 +234,22 @@ static void
_filter_change_cb(Ewl_Widget *w, void *ev, void *data)
{
char *filter;
Ewl_Filelist_Filter *f;
/* Fix this is ewl at some point */
f = ewl_filelist_filter_get(EWL_FILELIST(data));
if (f)
{
FREE(f->extension);
FREE(f);
}
Ewl_Filelist_Filter *old, *new;
filter = ewl_text_text_get(EWL_TEXT(w));
f = calloc(1, sizeof(Ewl_Filelist_Filter));
if (!f)
new = calloc(1, sizeof(Ewl_Filelist_Filter));
if (!new)
return;
new->extension = filter;
f->mime_list = NULL;
f->extension = filter;
ewl_filelist_filter_set(EWL_FILELIST(data), f);
/* Fix this is ewl at some point */
old = ewl_filelist_filter_get(EWL_FILELIST(data));
if (old)
{
FREE(old->extension);
FREE(old);
}
ewl_filelist_filter_set(EWL_FILELIST(data), new);
}