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,7 +288,11 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
cbs = menu_entries_get_actiondata_at_offset(list, i); cbs = menu_entries_get_actiondata_at_offset(list, i);
if (cbs && cbs->action_get_value && use_representation) if (cbs)
{
entry->enum_idx = cbs->enum_idx;
if (cbs->action_get_value && use_representation)
{ {
enum menu_hash_enums enum_idx = MENU_ENUM_LABEL_UNKNOWN; enum menu_hash_enums enum_idx = MENU_ENUM_LABEL_UNKNOWN;
const char *label = NULL; const char *label = NULL;
@ -300,6 +304,7 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
entry_label, path, entry_label, path,
entry->path, sizeof(entry->path)); entry->path, sizeof(entry->path));
} }
}
entry->idx = i; entry->idx = i;

View File

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