Move menu_flush_stack_type to menu_entries.c

This commit is contained in:
twinaphex 2014-09-01 05:25:31 +02:00
parent 5e88f487e9
commit 7586f8270b
3 changed files with 18 additions and 18 deletions

View File

@ -373,24 +373,6 @@ void menu_ticker_line(char *buf, size_t len, unsigned index,
}
}
void menu_flush_stack_type(unsigned final_type)
{
const char *path = NULL;
const char *label = NULL;
unsigned type = 0;
if (!driver.menu)
return;
driver.menu->need_refresh = true;
file_list_get_last(driver.menu->menu_stack, &path, &label, &type);
while (type != final_type)
{
file_list_pop(driver.menu->menu_stack, &driver.menu->selection_ptr);
file_list_get_last(driver.menu->menu_stack, &path, &label, &type);
}
}
bool menu_iterate(void)
{
const char *path = NULL;

View File

@ -812,3 +812,20 @@ void menu_entries_push_info(void)
file_list_push(driver.menu->menu_stack, "", "help", 0, 0);
}
void menu_flush_stack_type(unsigned final_type)
{
const char *path = NULL;
const char *label = NULL;
unsigned type = 0;
if (!driver.menu)
return;
driver.menu->need_refresh = true;
file_list_get_last(driver.menu->menu_stack, &path, &label, &type);
while (type != final_type)
{
file_list_pop(driver.menu->menu_stack, &driver.menu->selection_ptr);
file_list_get_last(driver.menu->menu_stack, &path, &label, &type);
}
}

View File

@ -25,5 +25,6 @@ void menu_entries_push_info(void);
int menu_parse_check(unsigned menu_type);
int menu_parse_and_resolve(void);
void menu_entries_pop(void);
void menu_flush_stack_type(unsigned final_type);
#endif