forked from enlightenment/enlightenment
parent
3bd036abcc
commit
7e57c9966a
|
@ -3,6 +3,8 @@
|
|||
void
|
||||
e_icon_free(E_Icon *icon)
|
||||
{
|
||||
IF_FREE(icon->file);
|
||||
IF_FREE(icon->icon);
|
||||
FREE(icon);
|
||||
}
|
||||
|
||||
|
@ -51,6 +53,8 @@ e_icon_realize(E_Icon *icon)
|
|||
void
|
||||
e_icon_unrealize(E_Icon *icon)
|
||||
{
|
||||
if (icon->obj.icon) evas_del_object(icon->view->evas, icon->obj.icon);
|
||||
if (icon->obj.filename) evas_del_object(icon->view->evas, icon->obj.filename);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
18
src/view.c
18
src/view.c
|
@ -405,6 +405,23 @@ e_view_file_deleted(int id, char *file)
|
|||
printf("e_view_file_deleted(%i, \"%s\");\n", id, file);
|
||||
v = e_view_find_by_monitor_id(id);
|
||||
if (!v) return;
|
||||
icon = e_view_find_icon_by_file(v, file);
|
||||
if (icon) e_view_del_icon(v, icon);
|
||||
}
|
||||
|
||||
E_Icon *
|
||||
e_view_find_icon_by_file(E_View *v, char *file)
|
||||
{
|
||||
Evas_List l;
|
||||
|
||||
for (l = v->icons; l; l = l->next)
|
||||
{
|
||||
E_Icon *icon;
|
||||
|
||||
icon = l->data;
|
||||
if (!strcmp(file, icon->file)) return icon;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -577,6 +594,7 @@ e_view_del_icon(E_View *v, E_Icon *icon)
|
|||
{
|
||||
if (!icon->view) return;
|
||||
e_icon_unrealize(icon);
|
||||
OBJ_UNREF(icon);
|
||||
icon->view = NULL;
|
||||
icon->changed = 1;
|
||||
v->changed = 1;
|
||||
|
|
Loading…
Reference in New Issue