Use menu_list_get_entry

This commit is contained in:
twinaphex 2015-05-08 11:45:30 +02:00
parent a57cfde1cd
commit 50944bb1e1

View File

@ -565,21 +565,16 @@ static int action_iterate_switch(const char *label, unsigned action)
static void action_iterate_post(int *ret, const char *label, unsigned action) static void action_iterate_post(int *ret, const char *label, unsigned action)
{ {
unsigned type_offset = 0; menu_entry_t entry;
const char *label_offset = NULL;
const char *path_offset = NULL;
menu_file_list_cbs_t *cbs = NULL; menu_file_list_cbs_t *cbs = NULL;
menu_list_t *menu_list = menu_list_get_ptr(); menu_list_t *menu_list = menu_list_get_ptr();
size_t selected = menu_navigation_get_current_selection(); size_t selected = menu_navigation_get_current_selection();
cbs = (menu_file_list_cbs_t*) menu_list_get_entry(&entry, selected, NULL, false);
menu_list_get_actiondata_at_offset(menu_list->selection_buf,
selected);
menu_list_get_at_offset(menu_list->selection_buf, cbs = (menu_file_list_cbs_t*)menu_list_get_actiondata_at_offset(menu_list->selection_buf, selected);
selected, &path_offset, &label_offset, &type_offset);
menu_input_post_iterate(ret, cbs, path_offset, label_offset, type_offset, action); menu_input_post_iterate(ret, cbs, entry.path, entry.label, entry.type, action);
} }
static int action_iterate_main(const char *label, unsigned action) static int action_iterate_main(const char *label, unsigned action)