This commit is contained in:
twinaphex 2018-01-12 03:54:51 +01:00
parent 3bb5072e1b
commit a5e35e7193
2 changed files with 17 additions and 27 deletions

View File

@ -1258,11 +1258,7 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
if (list_size == 0)
{
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
msg_hash_to_str(MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE,
MENU_INFO_MESSAGE, 0, 0);
info->need_push_no_playlist_entries = true;
return 0;
}
@ -1972,11 +1968,7 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
}
if (db_info->count < 1)
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
msg_hash_to_str(MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE,
0, 0, 0);
info->need_push_no_playlist_entries = true;
playlist_free(playlist);
database_info_list_free(db_info);
@ -3810,14 +3802,7 @@ static bool menu_displaylist_push_internal(
MENU_ENUM_LABEL_TAKE_SCREENSHOT,
MENU_SETTING_ACTION_SCREENSHOT, 0, 0);
else
menu_entries_append_enum(info->list,
msg_hash_to_str(
MENU_ENUM_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
msg_hash_to_str(
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE,
MENU_INFO_MESSAGE, 0, 0);
info->need_push_no_playlist_entries = true;
#endif
menu_displaylist_ctl(DISPLAYLIST_IMAGES_HISTORY, info);
return true;
@ -3842,15 +3827,9 @@ static bool menu_displaylist_push_internal(
if (string_is_empty(settings->paths.directory_playlist))
{
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
menu_entries_append_enum(info->list,
msg_hash_to_str(
MENU_ENUM_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
msg_hash_to_str(
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE,
MENU_INFO_MESSAGE, 0, 0);
info->need_refresh = true;
info->need_push = true;
info->need_refresh = true;
info->need_push_no_playlist_entries = true;
info->need_push = true;
return true;
}
@ -4082,6 +4061,15 @@ bool menu_displaylist_process(menu_displaylist_info_t *info)
if (info->need_push)
{
if (info->need_push_no_playlist_entries)
menu_entries_append_enum(info->list,
msg_hash_to_str(
MENU_ENUM_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
msg_hash_to_str(
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE,
MENU_INFO_MESSAGE, 0, 0);
if (!string_is_empty(info->label))
info->label_hash = msg_hash_calculate(info->label);
menu_driver_populate_entries(info);
@ -4120,6 +4108,7 @@ void menu_displaylist_info_init(menu_displaylist_info_t *info)
info->need_sort = false;
info->need_refresh = false;
info->need_entries_refresh = false;
info->need_push_no_playlist_entries = false;
info->need_push = false;
info->need_clear = false;
info->push_builtin_cores = false;

View File

@ -174,6 +174,7 @@ typedef struct menu_displaylist_info
bool need_refresh;
bool need_entries_refresh;
bool need_push;
bool need_push_no_playlist_entries;
/* should we clear the displaylist before we push
* entries onto it? */
bool need_clear;