Add menu_list_set_alt_at_offset and menu_list_get_alt_at_offset

This commit is contained in:
twinaphex 2014-10-17 23:43:53 +02:00
parent 744e87f14d
commit 9bce38426c
4 changed files with 21 additions and 3 deletions

View File

@ -56,7 +56,7 @@ static inline int entries_list_get_first_char(file_list_t *buf,
int ret;
const char *path = NULL;
file_list_get_alt_at_offset(buf, offset, &path);
menu_list_get_alt_at_offset(buf, offset, &path);
ret = tolower(*path);
/* "Normalize" non-alphabetical entries so they
@ -360,7 +360,7 @@ int menu_entries_parse_list(file_list_t *list, file_list_t *menu_list,
if (g_extern.core_info &&
core_info_list_get_display_name(g_extern.core_info,
core_path, display_name, sizeof(display_name)))
file_list_set_alt_at_offset(list, i, display_name);
menu_list_set_alt_at_offset(list, i, display_name);
}
file_list_sort_on_alt(list);
}

View File

@ -1473,7 +1473,7 @@ static int deferred_push_core_list_deferred(void *data, void *userdata,
{
menu_list_push(list, info[i].path, "",
MENU_FILE_CORE, 0);
file_list_set_alt_at_offset(list, i,
menu_list_set_alt_at_offset(list, i,
info[i].display_name);
}

View File

@ -250,3 +250,15 @@ void menu_list_push_stack_refresh(file_list_t *list,
menu_navigation_clear(driver.menu, true);
driver.menu->need_refresh = true;
}
void menu_list_set_alt_at_offset(file_list_t *list, size_t index,
const char *alt)
{
file_list_set_alt_at_offset(list, index, alt);
}
void menu_list_get_alt_at_offset(const file_list_t *list, size_t index,
const char **alt)
{
file_list_get_alt_at_offset(list, index, alt);
}

View File

@ -75,6 +75,12 @@ void menu_list_push_stack_refresh(file_list_t *list,
const char *path, const char *label,
unsigned type, size_t directory_ptr);
void menu_list_get_alt_at_offset(const file_list_t *list, size_t index,
const char **alt);
void menu_list_set_alt_at_offset(file_list_t *list, size_t index,
const char *alt);
#ifdef __cplusplus
}
#endif