Fix titles when Settings / History tab are selected

This commit is contained in:
twinaphex 2016-06-17 19:00:28 +02:00
parent a2947da8ec
commit e3954eda54

View File

@ -277,6 +277,10 @@ static int action_get_title_group_settings(const char *path, const char *label,
char elem1[PATH_MAX_LENGTH] = {0}; char elem1[PATH_MAX_LENGTH] = {0};
struct string_list *list_label = string_split(label, "|"); 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 (list_label) if (list_label)
{ {
if (list_label->size > 0) if (list_label->size > 0)
@ -295,14 +299,8 @@ static int action_get_title_group_settings(const char *path, const char *label,
strlcat(s, " - ", len); strlcat(s, " - ", len);
strlcat(s, elem1, len); strlcat(s, elem1, len);
} }
return 0;
} }
static int action_get_title_main_menu(const char *path, const char *label,
unsigned menu_type, char *s, size_t len)
{
sanitize_to_string(s, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_MAIN_MENU), len);
return 0; return 0;
} }
@ -714,7 +712,7 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
switch (cbs->enum_idx) switch (cbs->enum_idx)
{ {
case MENU_ENUM_LABEL_MAIN_MENU: case MENU_ENUM_LABEL_MAIN_MENU:
BIND_ACTION_GET_TITLE(cbs, action_get_title_main_menu); BIND_ACTION_GET_TITLE(cbs, action_get_title_group_settings);
break; break;
case MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST: case MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_title_deferred_database_manager_list); BIND_ACTION_GET_TITLE(cbs, action_get_title_deferred_database_manager_list);