menu_entry_get - add enum_idx to member struct

This commit is contained in:
twinaphex 2016-06-17 21:03:00 +02:00
parent 4700ff55a1
commit 60cfc95c1c
2 changed files with 15 additions and 9 deletions

View File

@ -288,17 +288,22 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
cbs = menu_entries_get_actiondata_at_offset(list, i);
if (cbs && cbs->action_get_value && use_representation)
if (cbs)
{
enum menu_hash_enums enum_idx = MENU_ENUM_LABEL_UNKNOWN;
const char *label = NULL;
menu_entries_get_last_stack(NULL, &label, NULL, &enum_idx, NULL);
entry->enum_idx = cbs->enum_idx;
cbs->action_get_value(list,
&entry->spacing, entry->type, i, label,
entry->value, sizeof(entry->value),
entry_label, path,
entry->path, sizeof(entry->path));
if (cbs->action_get_value && use_representation)
{
enum menu_hash_enums enum_idx = MENU_ENUM_LABEL_UNKNOWN;
const char *label = NULL;
menu_entries_get_last_stack(NULL, &label, NULL, &enum_idx, NULL);
cbs->action_get_value(list,
&entry->spacing, entry->type, i, label,
entry->value, sizeof(entry->value),
entry_label, path,
entry->path, sizeof(entry->path));
}
}
entry->idx = i;

View File

@ -47,6 +47,7 @@ typedef struct menu_entry
char label[PATH_MAX_LENGTH];
char value[PATH_MAX_LENGTH];
size_t entry_idx;
enum menu_hash_enums enum_idx;
unsigned idx;
unsigned type;
unsigned spacing;