Remove menu_list_get_alt_at_offset
This commit is contained in:
parent
b2a4e92c28
commit
14e46e0048
|
@ -235,7 +235,7 @@ void file_list_get_label_at_offset(const file_list_t *list, size_t idx,
|
||||||
void file_list_set_alt_at_offset(file_list_t *list, size_t idx,
|
void file_list_set_alt_at_offset(file_list_t *list, size_t idx,
|
||||||
const char *alt)
|
const char *alt)
|
||||||
{
|
{
|
||||||
if (!list)
|
if (!list || !alt)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (list->list[idx].alt)
|
if (list->list[idx].alt)
|
||||||
|
|
|
@ -361,7 +361,10 @@ static void menu_action_setting_disp_set_label_menu_file_core(
|
||||||
{
|
{
|
||||||
const char *alt = NULL;
|
const char *alt = NULL;
|
||||||
strlcpy(s, "(CORE)", len);
|
strlcpy(s, "(CORE)", len);
|
||||||
menu_list_get_alt_at_offset(list, i, &alt);
|
|
||||||
|
menu_entries_get_at_offset(list, i, NULL,
|
||||||
|
NULL, NULL, NULL, &alt);
|
||||||
|
|
||||||
*w = strlen(s);
|
*w = strlen(s);
|
||||||
if (alt)
|
if (alt)
|
||||||
strlcpy(s2, alt, len2);
|
strlcpy(s2, alt, len2);
|
||||||
|
@ -847,7 +850,10 @@ static void menu_action_setting_disp_set_label_menu_file_url_core(
|
||||||
{
|
{
|
||||||
const char *alt = NULL;
|
const char *alt = NULL;
|
||||||
strlcpy(s, "(CORE)", len);
|
strlcpy(s, "(CORE)", len);
|
||||||
menu_list_get_alt_at_offset(list, i, &alt);
|
|
||||||
|
menu_entries_get_at_offset(list, i, NULL,
|
||||||
|
NULL, NULL, NULL, &alt);
|
||||||
|
|
||||||
*w = strlen(s);
|
*w = strlen(s);
|
||||||
if (alt)
|
if (alt)
|
||||||
strlcpy(s2, alt, len2);
|
strlcpy(s2, alt, len2);
|
||||||
|
|
|
@ -2193,7 +2193,8 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
|
||||||
unsigned type = 0;
|
unsigned type = 0;
|
||||||
const char *path = NULL;
|
const char *path = NULL;
|
||||||
|
|
||||||
menu_list_get_at_offset(info->list, i, &path, NULL, &type, NULL);
|
menu_entries_get_at_offset(info->list, i, &path, NULL, &type, NULL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
if (type != MENU_FILE_CORE)
|
if (type != MENU_FILE_CORE)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -98,11 +98,12 @@ static size_t menu_list_get_stack_size(menu_list_t *list)
|
||||||
return file_list_get_size(list->menu_stack);
|
return file_list_get_size(list->menu_stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_list_get_at_offset(const file_list_t *list, size_t idx,
|
void menu_entries_get_at_offset(const file_list_t *list, size_t idx,
|
||||||
const char **path, const char **label, unsigned *file_type,
|
const char **path, const char **label, unsigned *file_type,
|
||||||
size_t *entry_idx)
|
size_t *entry_idx, const char **alt)
|
||||||
{
|
{
|
||||||
file_list_get_at_offset(list, idx, path, label, file_type, entry_idx);
|
file_list_get_at_offset(list, idx, path, label, file_type, entry_idx);
|
||||||
|
file_list_get_alt_at_offset(list, idx, alt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_list_get_last(const file_list_t *list,
|
void menu_list_get_last(const file_list_t *list,
|
||||||
|
@ -214,12 +215,6 @@ void menu_list_set_alt_at_offset(file_list_t *list, size_t idx,
|
||||||
file_list_set_alt_at_offset(list, idx, alt);
|
file_list_set_alt_at_offset(list, idx, alt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_list_get_alt_at_offset(const file_list_t *list, size_t idx,
|
|
||||||
const char **alt)
|
|
||||||
{
|
|
||||||
file_list_get_alt_at_offset(list, idx, alt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* menu_list_elem_is_dir:
|
* menu_list_elem_is_dir:
|
||||||
* @list : File list handle.
|
* @list : File list handle.
|
||||||
|
@ -234,7 +229,7 @@ static bool menu_list_elem_is_dir(file_list_t *list,
|
||||||
{
|
{
|
||||||
unsigned type = 0;
|
unsigned type = 0;
|
||||||
|
|
||||||
menu_list_get_at_offset(list, offset, NULL, NULL, &type, NULL);
|
menu_entries_get_at_offset(list, offset, NULL, NULL, &type, NULL, NULL);
|
||||||
|
|
||||||
return type == MENU_FILE_DIRECTORY;
|
return type == MENU_FILE_DIRECTORY;
|
||||||
}
|
}
|
||||||
|
@ -255,7 +250,7 @@ static int menu_list_elem_get_first_char(
|
||||||
int ret;
|
int ret;
|
||||||
const char *path = NULL;
|
const char *path = NULL;
|
||||||
|
|
||||||
menu_list_get_alt_at_offset(list, offset, &path);
|
file_list_get_alt_at_offset(list, offset, &path);
|
||||||
ret = tolower((int)*path);
|
ret = tolower((int)*path);
|
||||||
|
|
||||||
/* "Normalize" non-alphabetical entries so they
|
/* "Normalize" non-alphabetical entries so they
|
||||||
|
@ -398,8 +393,8 @@ void menu_entries_get(size_t i, menu_entry_t *entry)
|
||||||
|
|
||||||
entry->path[0] = entry->value[0] = entry->label[0] = '\0';
|
entry->path[0] = entry->value[0] = entry->label[0] = '\0';
|
||||||
|
|
||||||
menu_list_get_at_offset(selection_buf, i,
|
menu_entries_get_at_offset(selection_buf, i,
|
||||||
&path, &entry_label, &entry->type, &entry->entry_idx);
|
&path, &entry_label, &entry->type, &entry->entry_idx, NULL);
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(selection_buf, i);
|
cbs = menu_list_get_actiondata_at_offset(selection_buf, i);
|
||||||
|
|
||||||
|
|
|
@ -153,9 +153,9 @@ size_t menu_entries_get_stack_size(void);
|
||||||
|
|
||||||
size_t menu_entries_get_size(void);
|
size_t menu_entries_get_size(void);
|
||||||
|
|
||||||
void menu_list_get_at_offset(const file_list_t *list, size_t idx,
|
void menu_entries_get_at_offset(const file_list_t *list, size_t idx,
|
||||||
const char **path, const char **label, unsigned *file_type,
|
const char **path, const char **label, unsigned *file_type,
|
||||||
size_t *entry_idx);
|
size_t *entry_idx, const char **alt);
|
||||||
|
|
||||||
menu_list_t *menu_list_get_ptr(void);
|
menu_list_t *menu_list_get_ptr(void);
|
||||||
|
|
||||||
|
@ -169,9 +169,6 @@ void menu_list_get_last(const file_list_t *list,
|
||||||
|
|
||||||
void menu_entries_clear(file_list_t *list);
|
void menu_entries_clear(file_list_t *list);
|
||||||
|
|
||||||
void menu_list_get_alt_at_offset(const file_list_t *list, size_t idx,
|
|
||||||
const char **alt);
|
|
||||||
|
|
||||||
void menu_list_set_alt_at_offset(file_list_t *list, size_t idx,
|
void menu_list_set_alt_at_offset(file_list_t *list, size_t idx,
|
||||||
const char *alt);
|
const char *alt);
|
||||||
|
|
||||||
|
|
|
@ -296,8 +296,8 @@ void menu_entry_get(menu_entry_t *entry, size_t i,
|
||||||
if (!list)
|
if (!list)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
menu_list_get_at_offset(list, i, &path, &entry_label, &entry->type,
|
menu_entries_get_at_offset(list, i, &path, &entry_label, &entry->type,
|
||||||
&entry->entry_idx);
|
&entry->entry_idx, NULL);
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(list, i);
|
cbs = menu_list_get_actiondata_at_offset(list, i);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue