Move list_populate_generic to menu_list.c
This commit is contained in:
parent
a4bc83a48c
commit
bcca74e266
|
@ -1596,19 +1596,6 @@ static int disk_options_disk_idx_toggle(unsigned type, const char *label,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int list_populate_generic(file_list_t *list, const char *path,
|
||||
const char *label, unsigned type)
|
||||
{
|
||||
driver.menu->scroll_indices_size = 0;
|
||||
menu_entries_build_scroll_indices(list);
|
||||
menu_entries_refresh(list);
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->populate_entries)
|
||||
driver.menu_ctx->populate_entries(driver.menu, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_core_list_deferred(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
|
@ -1635,7 +1622,7 @@ static int deferred_push_core_list_deferred(void *data, void *userdata,
|
|||
|
||||
menu_list_sort_on_alt(list);
|
||||
|
||||
list_populate_generic(list, path, label, type);
|
||||
menu_list_populate_generic(list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1655,7 +1642,7 @@ static int deferred_push_database_manager_list_deferred(void *data, void *userda
|
|||
|
||||
menu_list_sort_on_alt(list);
|
||||
|
||||
list_populate_generic(list, path, label, type);
|
||||
menu_list_populate_generic(list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2320,7 +2307,7 @@ static int deferred_push_core_manager_list(void *data, void *userdata,
|
|||
0, 0);
|
||||
#endif
|
||||
|
||||
list_populate_generic(list, path, label, type);
|
||||
menu_list_populate_generic(list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2376,7 +2363,7 @@ static int deferred_push_history_list(void *data, void *userdata,
|
|||
MENU_FILE_PLAYLIST_ENTRY, 0);
|
||||
}
|
||||
|
||||
list_populate_generic(list, path, label, type);
|
||||
menu_list_populate_generic(list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2403,7 +2390,7 @@ static int deferred_push_content_actions(void *data, void *userdata,
|
|||
menu_list_push(list, "Reset", "restart_content", MENU_SETTING_ACTION_RESET, 0);
|
||||
}
|
||||
|
||||
list_populate_generic(list, path, label, type);
|
||||
menu_list_populate_generic(list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "menu_common_list.h"
|
||||
#include "menu_list.h"
|
||||
#include "menu_navigation.h"
|
||||
#include "menu_entries.h"
|
||||
#include <string.h>
|
||||
|
||||
void menu_list_destroy(file_list_t *list)
|
||||
|
@ -304,3 +305,16 @@ void menu_list_sort_on_alt(file_list_t *list)
|
|||
{
|
||||
file_list_sort_on_alt(list);
|
||||
}
|
||||
|
||||
int menu_list_populate_generic(file_list_t *list, const char *path,
|
||||
const char *label, unsigned type)
|
||||
{
|
||||
driver.menu->scroll_indices_size = 0;
|
||||
menu_entries_build_scroll_indices(list);
|
||||
menu_entries_refresh(list);
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->populate_entries)
|
||||
driver.menu_ctx->populate_entries(driver.menu, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -94,6 +94,9 @@ void menu_list_get_alt_at_offset(const file_list_t *list, size_t idx,
|
|||
void menu_list_set_alt_at_offset(file_list_t *list, size_t idx,
|
||||
const char *alt);
|
||||
|
||||
int menu_list_populate_generic(file_list_t *list, const char *path,
|
||||
const char *label, unsigned type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue