From d25916cacf2114ddbe0a864d589bca3793aa3148 Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 09:56:27 +0200 Subject: [PATCH] Implemented setting for showing/hiding the "Options" option in the Quick Menu. --- config.def.h | 1 + configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 4 ++++ intl/msg_hash_cht.h | 4 ++++ intl/msg_hash_de.h | 4 ++++ intl/msg_hash_eo.h | 4 ++++ intl/msg_hash_fr.h | 4 ++++ intl/msg_hash_it.h | 4 ++++ intl/msg_hash_ja.h | 4 ++++ intl/msg_hash_ko.h | 4 ++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 ++++ intl/msg_hash_pt_br.h | 6 ++++++ intl/msg_hash_pt_pt.h | 4 ++++ intl/msg_hash_ru.h | 4 ++++ intl/msg_hash_us.h | 4 ++++ intl/msg_hash_vn.h | 4 ++++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ menu/menu_displaylist.c | 17 ++++++++++++----- menu/menu_setting.c | 15 +++++++++++++++ msg_hash.h | 1 + 22 files changed, 95 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index b6f31dcd64..3c615e4dcb 100644 --- a/config.def.h +++ b/config.def.h @@ -240,6 +240,7 @@ static bool quick_menu_show_take_screenshot = true; static bool quick_menu_show_save_load_state = true; static bool quick_menu_show_undo_save_load_state = true; static bool quick_menu_show_add_to_favorites = true; +static bool quick_menu_show_options = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index 652e995857..bb674f90ad 100644 --- a/configuration.c +++ b/configuration.c @@ -1195,6 +1195,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false); SETTING_BOOL("quick_menu_show_undo_save_load_state", &settings->bools.quick_menu_show_undo_save_load_state, true, quick_menu_show_undo_save_load_state, false); SETTING_BOOL("quick_menu_show_add_to_favorites", &settings->bools.quick_menu_show_add_to_favorites, true, quick_menu_show_add_to_favorites, false); + SETTING_BOOL("quick_menu_show_options", &settings->bools.quick_menu_show_options, true, quick_menu_show_options, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index a996a044bb..2ec99549ce 100644 --- a/configuration.h +++ b/configuration.h @@ -142,6 +142,7 @@ typedef struct settings bool quick_menu_show_save_load_state; bool quick_menu_show_undo_save_load_state; bool quick_menu_show_add_to_favorites; + bool quick_menu_show_options; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 78899f7aae..deb4db8f85 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3083,3 +3083,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 5c22c75bf8..5f7dcc9f33 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3083,3 +3083,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 2cb79aaceb..d1a6b80e4a 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3077,3 +3077,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 417981a366..a6a950ec48 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2946,3 +2946,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 5fe8a0e158..8307488da7 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3115,3 +3115,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index b6aef110cd..0b516746d0 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3169,3 +3169,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index a12816d092..91ec55780f 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3085,3 +3085,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index d681766d99..8bb6ecd6db 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3078,3 +3078,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 070da7fb14..ebeee2e561 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1315,3 +1315,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "quick_menu_show_undo_save_load_state") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "quick_menu_show_add_to_favorites") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS, + "quick_menu_show_options") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 209983c573..461bb804f0 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2946,3 +2946,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 64982eaf55..b281453859 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4018,3 +4018,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 4e4a2a52f4..cc37eca0ae 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3053,3 +3053,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 534e1f6056..f760f9ff82 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3136,3 +3136,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index ecfac9ff66..6527129a2b 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3171,3 +3171,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index b89f864a96..a6b834e789 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3107,3 +3107,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index e15a2b9b9e..6dc66ccb13 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -294,6 +294,7 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_take_screenshot, default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE) default_sublabel_macro(action_bind_sublabel_quick_menu_show_undo_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE) default_sublabel_macro(action_bind_sublabel_quick_menu_show_add_to_favorites, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_options, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -608,6 +609,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_add_to_favorites); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_options); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 4bca531532..3e8181a057 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2889,11 +2889,14 @@ static int menu_displaylist_parse_load_content_settings( MENU_ENUM_LABEL_ADD_TO_FAVORITES, FILE_TYPE_PLAYLIST_ENTRY, 0, 0); } - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_OPTIONS), - msg_hash_to_str(MENU_ENUM_LABEL_CORE_OPTIONS), - MENU_ENUM_LABEL_CORE_OPTIONS, - MENU_SETTING_ACTION, 0, 0); + if (settings->bools.quick_menu_show_options) + { + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_OPTIONS), + msg_hash_to_str(MENU_ENUM_LABEL_CORE_OPTIONS), + MENU_ENUM_LABEL_CORE_OPTIONS, + MENU_SETTING_ACTION, 0, 0); + } #if 0 menu_entries_append_enum(info->list, @@ -5376,6 +5379,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS, + PARSE_ONLY_BOOL, false); + info->need_refresh = true; info->need_push = true; break; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index eb9e0ded92..ae42a40464 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5896,6 +5896,21 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_options, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + quick_menu_show_options, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index 50e5680f5b..48a2716d4b 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -713,6 +713,7 @@ enum msg_hash_enums MENU_LABEL(QUICK_MENU_SHOW_SAVE_LOAD_STATE), MENU_LABEL(QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE), MENU_LABEL(QUICK_MENU_SHOW_ADD_TO_FAVORITES), + MENU_LABEL(QUICK_MENU_SHOW_OPTIONS), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION),