Ejemplo n.º 1
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;

   file_list_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;
}
Ejemplo n.º 2
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_get(menu_list, 0),
         path, label, file_type, entry_idx);
   cbs = menu_entries_get_last_stack_actiondata();
   if (cbs)
      *enum_idx = cbs->enum_idx;
}
Ejemplo n.º 3
0
/* Sets title to what the name of the current menu should be. */
int menu_entries_get_title(char *s, size_t len)
{
   unsigned menu_type        = 0;
   const char *path          = NULL;
   const char *label         = NULL;
   menu_file_list_cbs_t *cbs = menu_entries_get_last_stack_actiondata();
   
   if (!cbs)
      return -1;

   menu_entries_get_last_stack(&path, &label, &menu_type, NULL);

   if (cbs && cbs->action_get_title)
      return cbs->action_get_title(path, label, menu_type, s, len);
   return 0;
}
Ejemplo n.º 4
0
int menu_entry_pathdir_set_value(uint32_t i, const char *s)
{
   const char *menu_path     = NULL;
   menu_file_list_cbs_t *cbs = menu_entries_get_last_stack_actiondata();

   menu_entries_get_last_stack(&menu_path, NULL, NULL, NULL);

   if (!cbs || !cbs->setting)
      return -1;

   if (menu_setting_get_type(cbs->setting) != ST_DIR)
      return -1;

   menu_setting_set_with_string_representation(cbs->setting, menu_path);
   menu_setting_generic(cbs->setting, false);

   menu_entries_flush_stack(NULL, 49);

   return 0;
}