Make 'Scan File' work
This commit is contained in:
parent
6f268d7dff
commit
26b55ed2d2
|
@ -834,6 +834,12 @@ static int action_ok_path_use_directory(const char *path,
|
||||||
return menu_entry_pathdir_set_value(0, NULL);
|
return menu_entry_pathdir_set_value(0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int action_ok_scan_file(const char *path,
|
||||||
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
|
{
|
||||||
|
return action_scan_file(path, label, type, idx);
|
||||||
|
}
|
||||||
|
|
||||||
static int action_ok_path_scan_directory(const char *path,
|
static int action_ok_path_scan_directory(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
|
@ -1982,6 +1988,9 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||||
case MENU_FILE_PLAIN:
|
case MENU_FILE_PLAIN:
|
||||||
switch (menu_label_hash)
|
switch (menu_label_hash)
|
||||||
{
|
{
|
||||||
|
case MENU_LABEL_SCAN_FILE:
|
||||||
|
cbs->action_ok = action_ok_scan_file;
|
||||||
|
break;
|
||||||
case MENU_LABEL_DETECT_CORE_LIST:
|
case MENU_LABEL_DETECT_CORE_LIST:
|
||||||
#ifdef HAVE_COMPRESSION
|
#ifdef HAVE_COMPRESSION
|
||||||
if (type == MENU_FILE_IN_CARCHIVE)
|
if (type == MENU_FILE_IN_CARCHIVE)
|
||||||
|
|
|
@ -1862,7 +1862,7 @@ static int menu_displaylist_parse_options_remappings(menu_displaylist_info_t *in
|
||||||
|
|
||||||
static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *need_sort)
|
static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *need_sort)
|
||||||
{
|
{
|
||||||
bool path_is_compressed, push_dir;
|
bool path_is_compressed, push_dir, filter_ext;
|
||||||
size_t i, list_size;
|
size_t i, list_size;
|
||||||
struct string_list *str_list = NULL;
|
struct string_list *str_list = NULL;
|
||||||
int device = 0;
|
int device = 0;
|
||||||
|
@ -1896,12 +1896,17 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
|
||||||
push_dir = (info->setting
|
push_dir = (info->setting
|
||||||
&& info->setting->browser_selection_type == ST_DIR);
|
&& info->setting->browser_selection_type == ST_DIR);
|
||||||
|
|
||||||
|
filter_ext = settings->menu.navigation.browser.filter.supported_extensions_enable;
|
||||||
|
|
||||||
|
if (hash_label == MENU_LABEL_SCAN_FILE)
|
||||||
|
filter_ext = false;
|
||||||
|
|
||||||
if (path_is_compressed)
|
if (path_is_compressed)
|
||||||
str_list = compressed_file_list_new(info->path, info->exts);
|
str_list = compressed_file_list_new(info->path, info->exts);
|
||||||
else
|
else
|
||||||
str_list = dir_list_new(info->path,
|
str_list = dir_list_new(info->path,
|
||||||
settings->menu.navigation.browser.filter.supported_extensions_enable
|
filter_ext ? info->exts : NULL,
|
||||||
? info->exts : NULL, true);
|
true);
|
||||||
|
|
||||||
if (hash_label == MENU_LABEL_SCAN_DIRECTORY)
|
if (hash_label == MENU_LABEL_SCAN_DIRECTORY)
|
||||||
menu_list_push(info->list,
|
menu_list_push(info->list,
|
||||||
|
|
Loading…
Reference in New Issue