mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +00:00
We can translate the History Tab label now
This commit is contained in:
parent
e3954eda54
commit
1acc59b598
@ -497,7 +497,7 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
|
||||
}
|
||||
|
||||
static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
||||
unsigned type, uint32_t label_hash, uint32_t menu_label_hash)
|
||||
unsigned type, uint32_t label_hash, const char *menu_label, uint32_t menu_label_hash)
|
||||
{
|
||||
if (type >= MENU_SETTINGS_CHEAT_BEGIN
|
||||
&& type <= MENU_SETTINGS_CHEAT_END)
|
||||
@ -566,6 +566,11 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_DOWNLOAD_THUMBNAIL_CONTENT:
|
||||
case MENU_FILE_SCAN_DIRECTORY:
|
||||
case MENU_SETTING_GROUP:
|
||||
if (string_is_equal(menu_label, menu_hash_to_str_enum(MENU_ENUM_LABEL_HISTORY_TAB)))
|
||||
{
|
||||
BIND_ACTION_LEFT(cbs, action_left_mainmenu);
|
||||
break;
|
||||
}
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_VALUE_HORIZONTAL_MENU:
|
||||
@ -619,7 +624,7 @@ int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
||||
if (menu_cbs_init_bind_left_compare_label(cbs, label, label_hash, menu_label_hash, elem0) == 0)
|
||||
return 0;
|
||||
|
||||
if (menu_cbs_init_bind_left_compare_type(cbs, type, label_hash, menu_label_hash) == 0)
|
||||
if (menu_cbs_init_bind_left_compare_type(cbs, type, label_hash, menu_label, menu_label_hash) == 0)
|
||||
return 0;
|
||||
|
||||
return -1;
|
||||
|
@ -273,14 +273,16 @@ static int action_get_title_default(const char *path, const char *label,
|
||||
static int action_get_title_group_settings(const char *path, const char *label,
|
||||
unsigned menu_type, char *s, size_t len)
|
||||
{
|
||||
char elem0[PATH_MAX_LENGTH] = {0};
|
||||
char elem1[PATH_MAX_LENGTH] = {0};
|
||||
struct string_list *list_label = string_split(label, "|");
|
||||
|
||||
if (string_is_equal(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_MAIN_MENU)))
|
||||
strlcpy(s, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_MAIN_MENU), len);
|
||||
else if (string_is_equal(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_HISTORY_TAB)))
|
||||
strlcpy(s, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_HISTORY_TAB), len);
|
||||
else
|
||||
{
|
||||
char elem0[PATH_MAX_LENGTH] = {0};
|
||||
char elem1[PATH_MAX_LENGTH] = {0};
|
||||
struct string_list *list_label = string_split(label, "|");
|
||||
|
||||
if (list_label)
|
||||
{
|
||||
if (list_label->size > 0)
|
||||
|
@ -388,7 +388,7 @@ static bool nk_menu_init_list(void *data)
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
|
||||
strlcpy(info.label,
|
||||
menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_HISTORY_TAB), sizeof(info.label));
|
||||
menu_hash_to_str_enum(MENU_ENUM_LABEL_HISTORY_TAB), sizeof(info.label));
|
||||
|
||||
menu_entries_add_enum(menu_stack,
|
||||
info.path, info.label, MENU_ENUM_LABEL_UNKNOWN,
|
||||
|
@ -2990,7 +2990,7 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action
|
||||
break;
|
||||
case XMB_SYSTEM_TAB_HISTORY:
|
||||
menu_stack->list[stack_size - 1].label =
|
||||
strdup(menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_HISTORY_TAB));
|
||||
strdup(menu_hash_to_str_enum(MENU_ENUM_LABEL_HISTORY_TAB));
|
||||
menu_stack->list[stack_size - 1].type =
|
||||
MENU_HISTORY_TAB;
|
||||
break;
|
||||
|
@ -1129,7 +1129,7 @@ static bool zarch_menu_init_list(void *data)
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
|
||||
strlcpy(info.label,
|
||||
menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_HISTORY_TAB), sizeof(info.label));
|
||||
menu_hash_to_str_enum(MENU_ENUM_LABEL_HISTORY_TAB), sizeof(info.label));
|
||||
|
||||
menu_entries_add_enum(menu_stack,
|
||||
info.path, info.label, MENU_ENUM_LABEL_UNKNOWN, info.type, info.flags, 0);
|
||||
|
@ -102,6 +102,8 @@ const char *menu_hash_to_str_nl_enum(enum menu_hash_enums msg)
|
||||
return "Privacy";
|
||||
case MENU_ENUM_LABEL_VALUE_HORIZONTAL_MENU:
|
||||
return "Horizontal Menu";
|
||||
case MENU_ENUM_LABEL_VALUE_HISTORY_TAB:
|
||||
return "Geschiedenis tab";
|
||||
case MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND:
|
||||
return "Geen instellingen gevonden.";
|
||||
case MENU_ENUM_LABEL_VALUE_NO_PERFORMANCE_COUNTERS:
|
||||
|
@ -3503,6 +3503,13 @@ static bool menu_displaylist_push_internal(
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (string_is_equal(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_HISTORY_TAB)))
|
||||
{
|
||||
if (!menu_displaylist_ctl(DISPLAYLIST_HISTORY, info))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (menu_hash_calculate(label))
|
||||
{
|
||||
case MENU_VALUE_MAIN_MENU:
|
||||
|
Loading…
x
Reference in New Issue
Block a user