music-control: let the popup automatically delete the cover image.

This way the image of the cover is deleted after the popup-del animation.
This commit is contained in:
Davide Andreoli 2013-11-02 23:09:38 +01:00
parent a1d1e40559
commit 2822d8e22b
1 changed files with 6 additions and 7 deletions

View File

@ -48,13 +48,17 @@ _metadata_update(E_Music_Control_Instance *inst)
eina_strbuf_free(str);
img = edje_object_part_swallow_get(inst->content_popup, "cover_swallow");
E_FREE_FUNC(img, evas_object_del);
if (img)
{
e_popup_object_remove(inst->popup->win, img);
evas_object_del(img);
}
if (inst->ctxt->meta_cover)
{
img = evas_object_image_filled_add(evas_object_evas_get(inst->content_popup));
evas_object_image_file_set(img, inst->ctxt->meta_cover, NULL);
edje_object_part_swallow(inst->content_popup, "cover_swallow", img);
e_popup_object_add(inst->popup->win, img);
}
}
@ -129,11 +133,6 @@ _popup_new(E_Music_Control_Instance *inst)
void
music_control_popup_del(E_Music_Control_Instance *inst)
{
Evas_Object *cover;
cover = edje_object_part_swallow_get(inst->content_popup, "cover_swallow");
E_FREE_FUNC(cover, evas_object_del);
E_FREE_FUNC(inst->popup, e_object_del);
}