Rename menu_driver_list_delete to menu_driver_list_free

This commit is contained in:
twinaphex 2015-06-12 14:15:48 +02:00
parent e6416a6bad
commit 2bf636b913
5 changed files with 11 additions and 21 deletions

View File

@ -634,7 +634,7 @@ static void rmenu_xui_list_insert(file_list_t *list,
XuiListSetText(m_menulist, list_size, buf);
}
static void rmenu_xui_list_delete(file_list_t *list, size_t idx,
static void rmenu_xui_list_free(file_list_t *list, size_t idx,
size_t list_size)
{
int x = XuiListGetItemCount( m_menulist );
@ -677,7 +677,7 @@ menu_ctx_driver_t menu_ctx_rmenu_xui = {
rmenu_xui_navigation_alphabet,
rmenu_xui_navigation_alphabet,
rmenu_xui_list_insert,
rmenu_xui_list_delete,
rmenu_xui_list_free,
rmenu_xui_list_clear,
NULL,
NULL,

View File

@ -1902,7 +1902,7 @@ static void xmb_list_insert(file_list_t *list,
file_list_set_userdata(list, i, node);
}
static void xmb_list_delete(file_list_t *list,
static void xmb_list_free(file_list_t *list,
size_t idx, size_t list_size)
{
file_list_free_userdata(list, idx);
@ -2122,7 +2122,7 @@ menu_ctx_driver_t menu_ctx_xmb = {
xmb_navigation_alphabet,
xmb_navigation_alphabet,
xmb_list_insert,
xmb_list_delete,
xmb_list_free,
NULL,
xmb_list_cache,
xmb_list_get_size,

View File

@ -183,23 +183,13 @@ const menu_ctx_driver_t *menu_ctx_driver_get_ptr(void)
return driver->menu_ctx;
}
void menu_driver_list_delete(file_list_t *list, size_t idx, size_t list_size)
void menu_driver_list_free(file_list_t *list, size_t idx, size_t list_size)
{
menu_file_list_cbs_t *cbs = NULL;
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
if (driver->list_delete)
driver->list_delete(list, idx, list_size);
if (driver->list_free)
driver->list_free(list, idx, list_size);
if (!list)
return;
cbs = (menu_file_list_cbs_t*)file_list_get_actiondata_at_offset(list, idx);
if (cbs)
{
memset(cbs, 0, sizeof(*cbs));
}
file_list_free_actiondata(list, idx);
}

View File

@ -255,7 +255,7 @@ typedef struct menu_ctx_driver
void (*navigation_descend_alphabet)(size_t *);
void (*navigation_ascend_alphabet)(size_t *);
void (*list_insert)(file_list_t *list, const char *, const char *, size_t);
void (*list_delete)(file_list_t *list, size_t, size_t);
void (*list_free)(file_list_t *list, size_t, size_t);
void (*list_clear)(file_list_t *list);
void (*list_cache)(menu_list_type_t, unsigned);
size_t(*list_get_size)(void *data, menu_list_type_t type);
@ -347,7 +347,7 @@ void menu_driver_navigation_ascend_alphabet(size_t *);
void menu_driver_list_cache(menu_list_type_t type, unsigned action);
void menu_driver_list_delete(file_list_t *list, size_t i, size_t list_size);
void menu_driver_list_free(file_list_t *list, size_t i, size_t list_size);
void menu_driver_list_insert(file_list_t *list, const char *path,
const char *label, unsigned type, size_t list_size);

View File

@ -162,7 +162,7 @@ static void menu_list_destroy(file_list_t *list)
goto end;
for (i = 0; i < list->size; i++)
menu_driver_list_delete(list, i, list->size);
menu_driver_list_free(list, i, list->size);
end:
if (list)
@ -315,7 +315,7 @@ void menu_list_pop(file_list_t *list, size_t *directory_ptr)
goto end;
if (list->size != 0)
menu_driver_list_delete(list, list->size - 1, list->size - 1);
menu_driver_list_free(list, list->size - 1, list->size - 1);
end:
file_list_pop(list, directory_ptr);