Get rid of menu_entries_get_at_offset

This commit is contained in:
twinaphex 2021-03-10 05:23:50 +01:00
parent bbe46333e1
commit 003fc7ccc8
8 changed files with 39 additions and 47 deletions

View file

@ -414,9 +414,10 @@ static void menu_action_setting_disp_set_label_menu_file_core(
const char *alt = NULL;
strcpy_literal(s, "(CORE)");
menu_entries_get_at_offset(list, i, NULL,
NULL, NULL, NULL, &alt);
file_list_get_at_offset(list, i, NULL, NULL, NULL, NULL);
alt = list->list[i].alt
? list->list[i].alt
: list->list[i].path;
*w = (unsigned)strlen(s);
if (alt)
strlcpy(s2, alt, len2);
@ -438,8 +439,10 @@ static void menu_action_setting_disp_set_label_core_updater_entry(
*s = '\0';
*w = 0;
menu_entries_get_at_offset(list, i, NULL,
NULL, NULL, NULL, &alt);
file_list_get_at_offset(list, i, NULL, NULL, NULL, NULL);
alt = list->list[i].alt
? list->list[i].alt
: list->list[i].path;
if (alt)
strlcpy(s2, alt, len2);
@ -490,8 +493,10 @@ static void menu_action_setting_disp_set_label_core_manager_entry(
*s = '\0';
*w = 0;
menu_entries_get_at_offset(list, i, NULL,
NULL, NULL, NULL, &alt);
file_list_get_at_offset(list, i, NULL, NULL, NULL, NULL);
alt = list->list[i].alt
? list->list[i].alt
: list->list[i].path;
if (alt)
strlcpy(s2, alt, len2);
@ -525,8 +530,10 @@ static void menu_action_setting_disp_set_label_core_lock(
*s = '\0';
*w = 0;
menu_entries_get_at_offset(list, i, NULL,
NULL, NULL, NULL, &alt);
file_list_get_at_offset(list, i, NULL, NULL, NULL, NULL);
alt = list->list[i].alt
? list->list[i].alt
: list->list[i].path;
if (alt)
strlcpy(s2, alt, len2);