Пример #1
0
static void menu_list_flush_stack(menu_list_t *list,
      size_t idx, const char *needle, unsigned final_type)
{
   const char *path       = NULL;
   const char *label      = NULL;
   unsigned type          = 0;
   size_t entry_idx       = 0;
   if (!list)
      return;

   menu_entries_set_refresh(false);
   menu_entries_get_last(list->menu_stack[idx],
         &path, &label, &type, &entry_idx);

   while (menu_entries_flush_stack_type(
            needle, label, type, final_type) != 0)
   {
      size_t new_selection_ptr;

      menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &new_selection_ptr);

      if (!menu_list_pop_stack(list, idx, &new_selection_ptr))
         break;

      menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &new_selection_ptr);

      menu_entries_get_last(list->menu_stack[idx],
            &path, &label, &type, &entry_idx);
   }
}
Пример #2
0
void menu_entries_get_last_stack(const char **path, const char **label,
      unsigned *file_type, size_t *entry_idx)
{
   menu_list_t *menu_list         = menu_list_get_ptr();
   if (menu_list)
      menu_entries_get_last(menu_list->menu_stack[0], path, label, file_type, entry_idx);
}
Пример #3
0
void menu_entries_get_last_stack(const char **path, const char **label,
      unsigned *file_type, size_t *entry_idx)
{
   menu_list_t *menu_list         = NULL;
   menu_entries_ctl(MENU_ENTRIES_CTL_LIST_GET, &menu_list);
   if (menu_list)
      menu_entries_get_last(menu_list->menu_stack[0], path, label, file_type, entry_idx);
}
Пример #4
0
void menu_entries_get_last_stack(const char **path, const char **label,
      unsigned *file_type, enum msg_hash_enums *enum_idx, size_t *entry_idx)
{
   menu_file_list_cbs_t *cbs      = NULL;
   menu_list_t *menu_list         = menu_entries_list;
   if (!menu_list)
      return;

   menu_entries_get_last(menu_list_get(menu_list, 0),
         path, label, file_type, entry_idx);
   cbs = menu_entries_get_last_stack_actiondata();
   if (cbs && enum_idx)
      *enum_idx = cbs->enum_idx;
}
Пример #5
0
void menu_entries_get_last_stack(const char **path, const char **label,
      unsigned *file_type, enum msg_hash_enums *enum_idx, size_t *entry_idx)
{
   menu_file_list_cbs_t *cbs      = NULL;
   menu_list_t *menu_list         = NULL;
   menu_entries_ctl(MENU_ENTRIES_CTL_LIST_GET, &menu_list);
   if (!menu_list)
      return;

   menu_entries_get_last(menu_list->menu_stack[0],
         path, label, file_type, entry_idx);
   cbs = menu_entries_get_last_stack_actiondata();
   if (cbs)
      *enum_idx = cbs->enum_idx;
}
Пример #6
0
void menu_list_flush_stack(menu_list_t *list,
      size_t idx, const char *needle, unsigned final_type)
{
   bool refresh           = false;
   const char *path       = NULL;
   const char *label      = NULL;
   unsigned type          = 0;
   size_t entry_idx       = 0;
   file_list_t *menu_list = menu_list_get(list, idx);
   if (!list)
      return;

   menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
   menu_entries_get_last(menu_list,
         &path, &label, &type, &entry_idx);

   while (menu_list_flush_stack_type(
            needle, label, type, final_type) != 0)
   {
      size_t new_selection_ptr;

      menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION,
            &new_selection_ptr);

      if (!menu_list_pop_stack(list, idx, &new_selection_ptr, 1))
         break;

      menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION,
            &new_selection_ptr);

      menu_list = menu_list_get(list, idx);

      menu_entries_get_last(menu_list,
            &path, &label, &type, &entry_idx);
   }
}