Have only one Menu Navigation Wraparound setting

This commit is contained in:
twinaphex 2015-10-25 02:59:38 +01:00
parent b348f13ef0
commit 00bb8bd6d5
15 changed files with 35 additions and 77 deletions

View File

@ -582,8 +582,7 @@ static void config_set_defaults(void)
settings->menu.dpi.override_value = menu_dpi_override_value;
settings->menu.navigation.wraparound.setting_enable = true;
settings->menu.navigation.wraparound.horizontal_enable = true;
settings->menu.navigation.wraparound.vertical_enable = true;
settings->menu.navigation.wraparound.enable = true;
settings->menu.navigation.browser.filter.supported_extensions_enable = true;
#endif
@ -1279,10 +1278,8 @@ static bool config_load_file(const char *path, bool set_defaults)
"menu_dynamic_wallpaper_enable");
CONFIG_GET_BOOL_BASE(conf, settings, menu.boxart_enable,
"menu_boxart_enable");
CONFIG_GET_BOOL_BASE(conf, settings, menu.navigation.wraparound.horizontal_enable,
"menu_navigation_wraparound_horizontal_enable");
CONFIG_GET_BOOL_BASE(conf, settings, menu.navigation.wraparound.vertical_enable,
"menu_navigation_wraparound_vertical_enable");
CONFIG_GET_BOOL_BASE(conf, settings, menu.navigation.wraparound.enable,
"menu_navigation_wraparound_enable");
CONFIG_GET_BOOL_BASE(conf, settings,
menu.navigation.browser.filter.supported_extensions_enable,
"menu_navigation_browser_filter_supported_extensions_enable");
@ -2634,10 +2631,8 @@ bool config_save_file(const char *path)
settings->menu_config_directory : "default");
config_set_bool(conf, "rgui_show_start_screen",
settings->menu_show_start_screen);
config_set_bool(conf, "menu_navigation_wraparound_horizontal_enable",
settings->menu.navigation.wraparound.horizontal_enable);
config_set_bool(conf, "menu_navigation_wraparound_vertical_enable",
settings->menu.navigation.wraparound.vertical_enable);
config_set_bool(conf, "menu_navigation_wraparound_enable",
settings->menu.navigation.wraparound.enable);
config_set_bool(conf,
"menu_navigation_browser_filter_supported_extensions_enable",
settings->menu.navigation.browser.filter.supported_extensions_enable);

View File

@ -132,8 +132,7 @@ typedef struct settings
{
struct
{
bool horizontal_enable;
bool vertical_enable;
bool enable;
bool setting_enable;
} wraparound;
struct

View File

@ -141,7 +141,7 @@ static int action_left_mainmenu(unsigned type, const char *label,
{
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection);
if (menu_driver_list_get_selection() != 0
|| settings->menu.navigation.wraparound.horizontal_enable)
|| settings->menu.navigation.wraparound.enable)
push_list = 1;
}
else

View File

@ -166,7 +166,7 @@ static int action_right_mainmenu(unsigned type, const char *label,
{
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection);
if (menu_driver_list_get_selection() != (menu_driver_list_get_size(MENU_LIST_HORIZONTAL) + 3)
|| settings->menu.navigation.wraparound.horizontal_enable)
|| settings->menu.navigation.wraparound.enable)
push_list = 1;
}
else

View File

@ -483,10 +483,8 @@ const char *menu_hash_to_str_de(uint32_t hash)
return "Buildbot-Cores-URL";
case MENU_LABEL_VALUE_BUILDBOT_ASSETS_URL:
return "Buildbot-Assets-URL";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_HORIZONTAL:
return "Navigation horizontal umbrechen";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_VERTICAL:
return "Navigation vertikal umbrechen";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND:
return "Navigation umbrechen";
case MENU_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
return "Bekannte Dateiendungen filtern";
case MENU_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE:

View File

@ -540,10 +540,8 @@ const char *menu_hash_to_str_es(uint32_t hash)
return "URL de núcleos de Buildbot";
case MENU_LABEL_VALUE_BUILDBOT_ASSETS_URL:
return "URL de recursos de Buildbot";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_HORIZONTAL:
return "Seguir navegación: horizontalmente";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_VERTICAL:
return "Seguir navegación: verticalmente";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND:
return "Seguir navegación";
case MENU_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
return "Filtrar por extensiones compatibles";
case MENU_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE:

View File

@ -498,10 +498,8 @@ const char *menu_hash_to_str_fr(uint32_t hash)
return "URL du buildbot des coeurs";
case MENU_LABEL_VALUE_BUILDBOT_ASSETS_URL:
return "URL du buildbot des assets";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_HORIZONTAL:
return "Saut-retour horizontal";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_VERTICAL:
return "Saut-retour vertical";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND:
return "Saut-retour";
case MENU_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
return "Filtrer par extentions supportées";
case MENU_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE:

View File

@ -527,10 +527,8 @@ const char *menu_hash_to_str_nl(uint32_t hash)
return "Buildbot Cores URL";
case MENU_LABEL_VALUE_BUILDBOT_ASSETS_URL:
return "Buildbot Assets URL";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_HORIZONTAL:
return "Navigation Wrap-Around Horizontaal";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_VERTICAL:
return "Navigation Wrap-Around Verticaal";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND:
return "Navigatie Wrap-Around";
case MENU_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
return "Filter op ondersteunde extensies";
case MENU_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE:

View File

@ -493,10 +493,8 @@ const char *menu_hash_to_str_pl(uint32_t hash)
return "URL rdzeni buildbota";
case MENU_LABEL_VALUE_BUILDBOT_ASSETS_URL:
return "URL assetów buildbota";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_HORIZONTAL:
return "Zawijanie nawigacji poziomo";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_VERTICAL:
return "Zawijanie nawigacji pionowo";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND:
return "Zawijanie nawigacji";
case MENU_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
return "Filtruj wed³ug wspieranych rozszerzeñ";
case MENU_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE:

View File

@ -481,10 +481,8 @@ const char *menu_hash_to_str_pt(uint32_t hash)
return "URL Buildbot de Cores";
case MENU_LABEL_VALUE_BUILDBOT_ASSETS_URL:
return "URL Buildbot de Recursos (Assets)";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_HORIZONTAL:
return "Navegação Circular Horizontal";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_VERTICAL:
return "Navegação Circular Vertical";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND:
return "Navegação Circular";
case MENU_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
return "Filtrar por Extensões Suportadas";
case MENU_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE:

View File

@ -552,10 +552,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
return "core_updater_buildbot_url";
case MENU_LABEL_BUILDBOT_ASSETS_URL:
return "buildbot_assets_url";
case MENU_LABEL_NAVIGATION_WRAPAROUND_VERTICAL:
return "menu_navigation_wraparound_vertical_enable";
case MENU_LABEL_NAVIGATION_WRAPAROUND_HORIZONTAL:
return "menu_navigation_wraparound_horizontal_enable";
case MENU_LABEL_NAVIGATION_WRAPAROUND:
return "menu_navigation_wraparound_enable";
case MENU_LABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
return "menu_navigation_browser_filter_supported_extensions_enable";
case MENU_LABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE:
@ -1198,10 +1196,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
return "Buildbot Cores URL";
case MENU_LABEL_VALUE_BUILDBOT_ASSETS_URL:
return "Buildbot Assets URL";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_HORIZONTAL:
return "Navigation Wrap-Around Horizontal";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_VERTICAL:
return "Navigation Wrap-Around Vertical";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND:
return "Navigation Wrap-Around";
case MENU_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
return "Filter by supported extensions";
case MENU_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE:

View File

@ -527,10 +527,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
return "core_updater_buildbot_url";
case MENU_LABEL_BUILDBOT_ASSETS_URL:
return "buildbot_assets_url";
case MENU_LABEL_NAVIGATION_WRAPAROUND_VERTICAL:
return "menu_navigation_wraparound_vertical_enable";
case MENU_LABEL_NAVIGATION_WRAPAROUND_HORIZONTAL:
return "menu_navigation_wraparound_horizontal_enable";
case MENU_LABEL_NAVIGATION_WRAPAROUND:
return "menu_navigation_wraparound_enable";
case MENU_LABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
return "menu_navigation_browser_filter_supported_extensions_enable";
case MENU_LABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE:
@ -1151,10 +1149,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
return "Bûildbot Corês ÙRL";
case MENU_LABEL_VALUE_BUILDBOT_ASSETS_URL:
return "Büildböt Àssets ÚRL";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_HORIZONTAL:
return "Ñavigatiøn Wrap-Aröuñd Horízoñtàl";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_VERTICAL:
return "Ñavigation Wrâp-Around Vertical";
case MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND:
return "Ñavigatiøn Wrap-Aröuñd";
case MENU_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
return "Fïltër by sùppörtêd èxtênsioñs";
case MENU_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE:

View File

@ -637,10 +637,8 @@ extern "C" {
#define MENU_LABEL_VALUE_VIDEO_SHARED_CONTEXT 0x353d3287U
#define MENU_LABEL_DUMMY_ON_CORE_SHUTDOWN 0x78579f70U
#define MENU_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN 0xc50126d3U
#define MENU_LABEL_NAVIGATION_WRAPAROUND_HORIZONTAL 0x42ba315aU
#define MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_HORIZONTAL 0x2609b62fU
#define MENU_LABEL_NAVIGATION_WRAPAROUND_VERTICAL 0x052bcbcaU
#define MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_VERTICAL 0xfc3b3bdfU
#define MENU_LABEL_NAVIGATION_WRAPAROUND 0xe76ad251U
#define MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND 0x2609b62fU
#define MENU_LABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE 0xea48426bU
#define MENU_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE 0x94af8500U
#define MENU_LABEL_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE 0x593d2623U

View File

@ -97,7 +97,7 @@ bool menu_navigation_ctl(enum menu_navigation_ctl_state state, void *data)
}
else
{
if (settings->menu.navigation.wraparound.vertical_enable)
if (settings->menu.navigation.wraparound.enable)
{
bool pending_push = false;
menu_navigation_ctl(MENU_NAVIGATION_CTL_CLEAR, &pending_push);
@ -129,7 +129,7 @@ bool menu_navigation_ctl(enum menu_navigation_ctl_state state, void *data)
else
{
idx = menu_list_size - 1;
if (!settings->menu.navigation.wraparound.vertical_enable)
if (!settings->menu.navigation.wraparound.enable)
idx = 0;
}
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &idx);

View File

@ -5318,23 +5318,9 @@ static bool setting_append_list_menu_options(
START_SUB_GROUP(list, list_info, "Navigation", group_info.name, subgroup_info, parent_group);
CONFIG_BOOL(
settings->menu.navigation.wraparound.horizontal_enable,
menu_hash_to_str(MENU_LABEL_NAVIGATION_WRAPAROUND_HORIZONTAL),
menu_hash_to_str(MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_HORIZONTAL),
true,
menu_hash_to_str(MENU_VALUE_OFF),
menu_hash_to_str(MENU_VALUE_ON),
group_info.name,
subgroup_info.name,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_BOOL(
settings->menu.navigation.wraparound.vertical_enable,
menu_hash_to_str(MENU_LABEL_NAVIGATION_WRAPAROUND_VERTICAL),
menu_hash_to_str(MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND_VERTICAL),
settings->menu.navigation.wraparound.enable,
menu_hash_to_str(MENU_LABEL_NAVIGATION_WRAPAROUND),
menu_hash_to_str(MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND),
true,
menu_hash_to_str(MENU_VALUE_OFF),
menu_hash_to_str(MENU_VALUE_ON),