Fix selecting image with Menu Wallpaper

This commit is contained in:
twinaphex 2017-05-19 01:50:15 +02:00
parent 6d20fa96e0
commit 236f5b3514
4 changed files with 8 additions and 4 deletions

View File

@ -1574,7 +1574,7 @@ static int action_ok_lookup_setting(const char *path,
static int action_ok_menu_wallpaper(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
filebrowser_set_type(FILEBROWSER_SELECT_FILE);
filebrowser_set_type(FILEBROWSER_SELECT_IMAGE);
return action_ok_lookup_setting(path, label, type, idx, entry_idx);
}

View File

@ -6533,7 +6533,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
strlcpy(info->exts, "filt", sizeof(info->exts));
break;
case DISPLAYLIST_IMAGES:
if (filebrowser_get_type() != FILEBROWSER_SELECT_FILE)
if ( (filebrowser_get_type() != FILEBROWSER_SELECT_FILE)
&& (filebrowser_get_type() != FILEBROWSER_SELECT_IMAGE))
filebrowser_clear_type();
info->type_default = FILE_TYPE_IMAGE;
{

View File

@ -49,7 +49,9 @@ void filebrowser_clear_type(void)
void filebrowser_set_type(enum filebrowser_enums type)
{
if (filebrowser_types != FILEBROWSER_SELECT_FILE)
if ( (filebrowser_types != FILEBROWSER_SELECT_FILE)
&& (filebrowser_types != FILEBROWSER_SELECT_IMAGE)
)
filebrowser_types = type;
}
@ -206,7 +208,7 @@ void filebrowser_parse(void *data, unsigned type_data)
else
file_type = FILE_TYPE_IMAGE;
#endif
if (filebrowser_types == FILEBROWSER_SELECT_FILE)
if (filebrowser_types == FILEBROWSER_SELECT_IMAGE)
file_type = FILE_TYPE_IMAGE;
break;
default:

View File

@ -30,6 +30,7 @@ enum filebrowser_enums
FILEBROWSER_SELECT_DIR,
FILEBROWSER_SCAN_DIR,
FILEBROWSER_SELECT_FILE,
FILEBROWSER_SELECT_IMAGE,
FILEBROWSER_SELECT_COLLECTION
};