Commit 82853f57 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Destroy the audio player from the intf

parent a1c92b73
......@@ -973,11 +973,9 @@ audio_player_start(audio_player *mpd, Eina_Array *array, int pos)
update_player_display(mpd);
}
static void
audio_player_free(void *data, Evas *e, Evas_Object *obj, void *event_info)
void
destroy_audio_player(audio_player *mpd)
{
audio_player *mpd = data;
// Unregister from the playback service
playback_service_unregister_callbacks(mpd->p_ps, mpd->p_ps_cbs_id);
......@@ -1019,8 +1017,6 @@ audio_player_create(interface *intf, playback_service *p_ps, Evas_Object *layout
/* Put the mini player at the bottom of the content_box */
evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, 1.0);
evas_object_event_callback_add(layout, EVAS_CALLBACK_FREE, audio_player_free, mpd);
update_player_display(mpd);
return mpd;
}
......
......@@ -52,4 +52,7 @@ audio_player_collapse_fullscreen_player(audio_player *);
bool
audio_player_handle_back_key(audio_player *);
void
destroy_audio_player(audio_player *);
#endif /* MINI_PLAYER_H_ */
......@@ -522,8 +522,9 @@ intf_destroy(interface *intf)
if(intf->video_player != NULL)
destroy_video_player(intf->video_player);
/* Audio Player */
if(intf->p_mini_player != NULL)
;//FIXME
destroy_audio_player(intf->p_mini_player);
/* The window is the parent of all the objects:
win, layout, main_box, nf_content, sidebar, sidebar_toggle_btn,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment