Add entry_idx to menu_entry

This commit is contained in:
twinaphex 2015-06-10 23:00:38 +02:00
parent 5bd138b6ac
commit a45cdfffcc
2 changed files with 5 additions and 4 deletions

View File

@ -418,7 +418,7 @@ void menu_entry_get(menu_entry_t *entry, size_t i,
return;
menu_list_get_at_offset(list, i, &path, &entry_label, &entry->type,
NULL);
&entry->entry_idx);
cbs = menu_list_get_actiondata_at_offset(list, i);
@ -429,7 +429,7 @@ void menu_entry_get(menu_entry_t *entry, size_t i,
entry_label, path,
entry->path, sizeof(entry->path));
entry->id = i;
entry->idx = i;
if (path && !use_representation)
strlcpy(entry->path, path, sizeof(entry->path));
@ -456,7 +456,7 @@ int menu_entry_get_current_id(bool use_representation)
menu_entry_t entry = {{0}};
menu_entry_get(&entry, i, NULL, use_representation);
if (menu_entry_is_currently_selected(entry.id))
if (menu_entry_is_currently_selected(entry.idx))
return i;
}

View File

@ -43,7 +43,8 @@ typedef struct menu_entry
char path[PATH_MAX_LENGTH];
char label[PATH_MAX_LENGTH];
char value[PATH_MAX_LENGTH];
unsigned id;
size_t entry_idx;
unsigned idx;
unsigned type;
unsigned spacing;
} menu_entry_t;