Add default left/right callbacks for 'No Items'
This commit is contained in:
parent
d796ac592a
commit
d4f037f6d7
|
@ -458,15 +458,6 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case MENU_SETTING_NO_ITEM:
|
|
||||||
switch (menu_label_hash)
|
|
||||||
{
|
|
||||||
case MENU_VALUE_HORIZONTAL_MENU:
|
|
||||||
case MENU_VALUE_MAIN_MENU:
|
|
||||||
BIND_ACTION_LEFT(cbs, action_left_mainmenu);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX:
|
case MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX:
|
||||||
BIND_ACTION_LEFT(cbs, disk_options_disk_idx_left);
|
BIND_ACTION_LEFT(cbs, disk_options_disk_idx_left);
|
||||||
break;
|
break;
|
||||||
|
@ -535,6 +526,20 @@ int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
||||||
|
|
||||||
BIND_ACTION_LEFT(cbs, bind_left_generic);
|
BIND_ACTION_LEFT(cbs, bind_left_generic);
|
||||||
|
|
||||||
|
if (type == MENU_SETTING_NO_ITEM)
|
||||||
|
{
|
||||||
|
switch (menu_label_hash)
|
||||||
|
{
|
||||||
|
case MENU_VALUE_HORIZONTAL_MENU:
|
||||||
|
case MENU_VALUE_MAIN_MENU:
|
||||||
|
case 153956705: /* TODO/FIXME - dehardcode */
|
||||||
|
BIND_ACTION_LEFT(cbs, action_left_mainmenu);
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (menu_cbs_init_bind_left_compare_label(cbs, label, label_hash, menu_label_hash, elem0) == 0)
|
if (menu_cbs_init_bind_left_compare_label(cbs, label, label_hash, menu_label_hash, elem0) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -552,6 +552,20 @@ int menu_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
BIND_ACTION_RIGHT(cbs, bind_right_generic);
|
BIND_ACTION_RIGHT(cbs, bind_right_generic);
|
||||||
|
|
||||||
|
if (type == MENU_SETTING_NO_ITEM)
|
||||||
|
{
|
||||||
|
switch (menu_label_hash)
|
||||||
|
{
|
||||||
|
case MENU_VALUE_HORIZONTAL_MENU:
|
||||||
|
case MENU_VALUE_MAIN_MENU:
|
||||||
|
case 153956705: /* TODO/FIXME - dehardcode */
|
||||||
|
BIND_ACTION_RIGHT(cbs, action_right_mainmenu);
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (menu_cbs_init_bind_right_compare_label(cbs, label, label_hash, menu_label_hash, elem0) == 0)
|
if (menu_cbs_init_bind_right_compare_label(cbs, label, label_hash, menu_label_hash, elem0) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1929,7 +1929,7 @@ static int menu_displaylist_parse_options(menu_displaylist_info_t *info)
|
||||||
#else
|
#else
|
||||||
menu_entries_push(info->list,
|
menu_entries_push(info->list,
|
||||||
menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS),
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS),
|
||||||
"", 0, 0, 0);
|
"", MENU_SETTING_NO_ITEM, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2125,7 +2125,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool ho
|
||||||
{
|
{
|
||||||
menu_entries_push(info->list,
|
menu_entries_push(info->list,
|
||||||
menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS),
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS),
|
||||||
"", 0, 0, 0);
|
"", MENU_SETTING_NO_ITEM, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
string_list_free(str_list);
|
string_list_free(str_list);
|
||||||
|
@ -2402,7 +2402,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||||
#else
|
#else
|
||||||
menu_entries_push(info->list,
|
menu_entries_push(info->list,
|
||||||
menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS),
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS),
|
||||||
"", 0, 0, 0);
|
"", MENU_SETTING_NO_ITEM, 0, 0);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
#endif
|
#endif
|
||||||
info->need_refresh = true;
|
info->need_refresh = true;
|
||||||
|
|
Loading…
Reference in New Issue