Commit 2538dca1 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

audio_list_views: Don't require application to be passed during creation

parent 2f6dd26d
......@@ -106,7 +106,7 @@ audio_list_artist_view_append_item(list_sys *p_sys, void* p_data)
}
list_view*
audio_list_artist_view_create(application* p_app, interface* p_intf, Evas_Object* p_parent)
audio_list_artist_view_create(interface* p_intf, Evas_Object* p_parent)
{
list_view* p_view = calloc(1, sizeof(*p_view));
if (p_view == NULL)
......@@ -127,6 +127,7 @@ audio_list_artist_view_create(application* p_app, interface* p_intf, Evas_Object
p_view->pf_get_item = &audio_list_artist_item_get_media_item;
p_view->pf_set_item = &audio_list_artist_item_set_media_item;
application* p_app = intf_get_application( p_intf );
p_sys->p_ctrl = artist_controller_create(p_app, p_view);
media_library_controller_refresh( p_sys->p_ctrl );
......
......@@ -30,6 +30,6 @@
#include "ui/interface.h"
list_view*
audio_list_artist_view_create(application* p_app, interface* p_intf, Evas_Object* p_parent);
audio_list_artist_view_create(interface* p_intf, Evas_Object* p_parent);
#endif // AUDIO_LIST_ARTIST_VIEW_H_
......@@ -154,7 +154,7 @@ audio_list_song_view_append_item(list_sys *p_sys, void* p_data)
}
list_view*
audio_list_song_view_create(application* p_app, interface* p_intf, Evas_Object* p_parent)
audio_list_song_view_create(interface* p_intf, Evas_Object* p_parent)
{
list_view* p_view = calloc(1, sizeof(*p_view));
if (p_view == NULL)
......@@ -177,6 +177,7 @@ audio_list_song_view_create(application* p_app, interface* p_intf, Evas_Object*
p_view->pf_get_item = &audio_list_song_item_get_media_item;
p_view->pf_set_item = &audio_list_song_item_set_media_item;
application* p_app = intf_get_application( p_intf );
p_sys->p_ctrl = audio_controller_create(p_app, p_view);
media_library_controller_refresh(p_sys->p_ctrl);
......
......@@ -31,6 +31,6 @@
#include "ui/interface.h"
list_view*
audio_list_song_view_create(application* p_app, interface* p_intf, Evas_Object* p_parent);
audio_list_song_view_create(interface* p_intf, Evas_Object* p_parent);
#endif // AUDIO_LIST_SONG_ITEM_H_
......@@ -70,7 +70,6 @@ typedef struct toolbar_tab {
static list_view*
create_audio_list_type(view_sys *av, audio_view_type type )
{
application* p_app = intf_get_application(av->p_intf);
list_view* p_view = av->p_lists[type];
if(p_view == NULL)
{
......@@ -78,10 +77,10 @@ create_audio_list_type(view_sys *av, audio_view_type type )
{
case AUDIO_VIEW_SONG:
default:
p_view = audio_list_song_view_create(p_app, av->p_intf, av->nf_toolbar);
p_view = audio_list_song_view_create(av->p_intf, av->nf_toolbar);
break;
case AUDIO_VIEW_ARTIST:
p_view = audio_list_artist_view_create(p_app, av->p_intf, av->nf_toolbar);
p_view = audio_list_artist_view_create(av->p_intf, av->nf_toolbar);
break;
}
av->p_lists[type] = p_view;
......
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