diff --git a/configuration.c b/configuration.c index 3f9a0a0abc..96f0153c0e 100644 --- a/configuration.c +++ b/configuration.c @@ -990,6 +990,7 @@ static struct config_path_setting *populate_settings_path(settings_t *settings, /* Paths */ #ifdef HAVE_XMB SETTING_PATH("xmb_font", settings->paths.path_menu_xmb_font, false, NULL, true); + SETTING_PATH("xmb_show_settings_password", settings->paths.menu_xmb_show_settings_password, false, NULL, true); #endif SETTING_PATH("netplay_nickname", settings->paths.username, false, NULL, true); SETTING_PATH("video_filter", settings->paths.path_softfilter_plugin, false, NULL, true); diff --git a/configuration.h b/configuration.h index d4a73dba15..77a0f5f078 100644 --- a/configuration.h +++ b/configuration.h @@ -379,6 +379,7 @@ typedef struct settings #ifdef HAVE_MENU char path_menu_xmb_font[PATH_MAX_LENGTH]; + char menu_xmb_show_settings_password[PATH_MAX_LENGTH]; #endif char path_cheat_database[PATH_MAX_LENGTH]; char path_content_database[PATH_MAX_LENGTH]; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 7d78d479e4..2cc5e83d20 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -1,4 +1,4 @@ -MSG_HASH( +MSG_HASH( MSG_COMPILER, "编译器" ) @@ -3045,3 +3045,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 41c0f34a4e..a1bc897be9 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -1,4 +1,4 @@ -MSG_HASH( +MSG_HASH( MSG_COMPILER, "編譯器" ) @@ -3045,3 +3045,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 39e671f9c0..c8e297d1fe 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3039,3 +3039,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index f3fddd60a1..1fbfbeb151 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2908,3 +2908,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index e93f65c2f4..c2215e8bd9 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3077,3 +3077,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 5cb4f50653..5440d64028 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3131,3 +3131,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Icone del Menu") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Abilita/disabilita le icone del menu visualizzate sul lato sinistro di ogni voce.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 3b7053e440..b8b2cf8e4c 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -1,4 +1,4 @@ -#if defined(_MSC_VER) && !defined(_XBOX) +#if defined(_MSC_VER) && !defined(_XBOX) /* https://support.microsoft.com/en-us/kb/980263 */ #pragma execution_character_set("utf-8") #endif @@ -3031,3 +3031,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index a9cc790329..3ff5018be1 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -1,4 +1,4 @@ -MSG_HASH( +MSG_HASH( MSG_COMPILER, "컴파일러" ) @@ -3040,3 +3040,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 7069e2d7f3..1c267fbb34 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1151,6 +1151,8 @@ MSG_HASH(MENU_ENUM_LABEL_XMB_ALPHA_FACTOR, "xmb_alpha_factor") MSG_HASH(MENU_ENUM_LABEL_XMB_FONT, "xmb_font") +MSG_HASH(MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "xmb_main_menu_enable_settings") MSG_HASH(MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME, "xmb_menu_color_theme") MSG_HASH(MENU_ENUM_LABEL_XMB_RIBBON_ENABLE, @@ -1171,6 +1173,8 @@ MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_MUSIC, "xmb_show_music") MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_SETTINGS, "xmb_show_settings") +MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_SETTINGS_PASSWORD, + "xmb_show_settings_password") MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_VIDEO, "xmb_show_video") MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_NETPLAY, diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 939ac2016b..b434f8ccd0 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2908,3 +2908,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 0b40ad1a3d..e517dc56a9 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -3960,4 +3960,25 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, ) MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Habilitar/desabilitar os ícones exibidos do lado esquerdo dos itens de menu. " - ) \ No newline at end of file + ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab" + ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab" + ) +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password" + ) +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct." + ) +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect." + ) +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear." + ) +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index c5cd817d1c..ac543b90df 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3015,3 +3015,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 5ef0f49fba..8e43483a36 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -1,4 +1,4 @@ -#if defined(_MSC_VER) && !defined(_XBOX) +#if defined(_MSC_VER) && !defined(_XBOX) /* https://support.microsoft.com/en-us/kb/980263 */ #pragma execution_character_set("utf-8") #endif @@ -3098,3 +3098,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Иконки интерфейса") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Отображать или скрывать иконки интерфейса, отображающиеся в левой части меню.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 13b5e8505c..b12b1f2126 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3133,3 +3133,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index a5582641b6..0754579517 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -1,4 +1,4 @@ -MSG_HASH( +MSG_HASH( MSG_COMPILER, "Compiler" ) @@ -3069,3 +3069,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Menu Icons") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Enable/disable the menu icons shown at the lefthand side of the menu entries.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enable Settings Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "Set Password For Enabling Settings Tab") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + "Enter Password") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + "Password correct.") +MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "Password incorrect.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + "Enables the Settings tab. A restart is required for the tab to appear.") +MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD, + "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index d8302d8e38..e6232f947a 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1939,6 +1939,33 @@ static void menu_input_st_string_cb_rename_entry(void *userdata, menu_input_dialog_end(); } +static void menu_input_st_string_cb_enable_settings(void *userdata, + const char *str) +{ + if (str && *str) + { + const char *label = menu_input_dialog_get_buffer(); + settings_t *settings = config_get_ptr(); + + if (string_is_equal(label, settings->paths.menu_xmb_show_settings_password)) + { + settings->bools.menu_xmb_show_settings = true; + + runloop_msg_queue_push( + msg_hash_to_str(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK), + 1, 100, true); + } + else + { + runloop_msg_queue_push( + msg_hash_to_str(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK), + 1, 100, true); + } + } + + menu_input_dialog_end(); +} + static void menu_input_st_string_cb_save_preset(void *userdata, const char *str) { @@ -3200,6 +3227,22 @@ static int action_ok_delete_entry(const char *path, return 0; } +static int action_ok_enable_settings(const char *path, + const char *label, unsigned type, size_t idx, size_t entry_idx) +{ + menu_input_ctx_line_t line; + + line.label = msg_hash_to_str(MSG_INPUT_ENABLE_SETTINGS_PASSWORD); + line.label_setting = label; + line.type = type; + line.idx = (unsigned)entry_idx; + line.cb = menu_input_st_string_cb_enable_settings; + + if (!menu_input_dialog_start(&line)) + return -1; + return 0; +} + static int action_ok_rdb_entry_submenu(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -4309,6 +4352,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_DELETE_ENTRY: BIND_ACTION_OK(cbs, action_ok_delete_entry); break; + case MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS: + BIND_ACTION_OK(cbs, action_ok_enable_settings); + break; case MENU_ENUM_LABEL_QUIT_RETROARCH: BIND_ACTION_OK(cbs, action_ok_quit); break; diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 0a53bfe83f..9a35265a99 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -296,8 +296,10 @@ default_sublabel_macro(action_bind_sublabel_menu_music_tab, default_sublabel_macro(action_bind_sublabel_menu_video_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_VIDEO) default_sublabel_macro(action_bind_sublabel_menu_netplay_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_NETPLAY) default_sublabel_macro(action_bind_sublabel_menu_settings_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS) +default_sublabel_macro(action_bind_sublabel_menu_settings_tab_enable_password, MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD) default_sublabel_macro(action_bind_sublabel_menu_history_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_HISTORY) default_sublabel_macro(action_bind_sublabel_menu_import_content_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_ADD) +default_sublabel_macro(action_bind_sublabel_main_menu_enable_settings, MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS) default_sublabel_macro(action_bind_sublabel_rgui_show_start_screen, MENU_ENUM_SUBLABEL_RGUI_SHOW_START_SCREEN) default_sublabel_macro(action_bind_sublabel_menu_header_opacity, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_HEADER_OPACITY) default_sublabel_macro(action_bind_sublabel_menu_footer_opacity, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_FOOTER_OPACITY) @@ -559,12 +561,18 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_XMB_SHOW_ADD: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_import_content_tab); break; + case MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_main_menu_enable_settings); + break; case MENU_ENUM_LABEL_XMB_SHOW_HISTORY: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_history_tab); break; case MENU_ENUM_LABEL_XMB_SHOW_SETTINGS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_settings_tab); break; + case MENU_ENUM_LABEL_XMB_SHOW_SETTINGS_PASSWORD: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_settings_tab_enable_password); + break; case MENU_ENUM_LABEL_GOTO_IMAGES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_goto_images); break; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index f97609ddf5..1aa3378f43 100755 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -4331,6 +4331,14 @@ static int xmb_list_push(void *data, void *userdata, } } #endif + + settings_t *settings = config_get_ptr(); + if (!settings->bools.menu_xmb_show_settings && !string_is_empty(settings->paths.menu_xmb_show_settings_password)) + { + entry.enum_idx = MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS; + menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + } + entry.enum_idx = MENU_ENUM_LABEL_INFORMATION_LIST; menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); #ifndef HAVE_DYNAMIC diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index ae0a8c022f..0af5161efa 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -5283,6 +5283,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_XMB_SHOW_SETTINGS, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_XMB_SHOW_SETTINGS_PASSWORD, + PARSE_ONLY_STRING, false); + menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_XMB_SHOW_FAVORITES, PARSE_ONLY_BOOL, false); @@ -6367,6 +6371,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_START_CORE, PARSE_ACTION, false); } + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + PARSE_ACTION, false); #ifndef HAVE_DYNAMIC if (frontend_driver_has_fork()) diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 727f92e04c..552618fe70 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -2280,6 +2280,14 @@ static bool setting_append_list( &subgroup_info, parent_group); + CONFIG_ACTION( + list, list_info, + MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, + MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, + &group_info, + &subgroup_info, + parent_group); + #ifndef HAVE_DYNAMIC if (frontend_driver_has_fork()) #endif @@ -5388,6 +5396,20 @@ static bool setting_append_list( SD_FLAG_NONE); settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED); + CONFIG_STRING( + list, list_info, + settings->paths.menu_xmb_show_settings_password, + sizeof(settings->paths.menu_xmb_show_settings_password), + MENU_ENUM_LABEL_XMB_SHOW_SETTINGS_PASSWORD, + MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD, + "", + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT | SD_FLAG_LAKKA_ADVANCED); + CONFIG_BOOL( list, list_info, &settings->bools.menu_xmb_show_favorites, diff --git a/msg_hash.h b/msg_hash.h index dbf741f3de..abda5634bc 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -290,6 +290,9 @@ enum msg_hash_enums MSG_INPUT_PRESET_FILENAME, MSG_INPUT_CHEAT_FILENAME, MSG_INPUT_RENAME_ENTRY, + MSG_INPUT_ENABLE_SETTINGS_PASSWORD, + MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, + MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, MSG_REMAP_FILE_SAVED_SUCCESSFULLY, MSG_REMAP_FILE_REMOVED_SUCCESSFULLY, MSG_SHADER_PRESET_SAVED_SUCCESSFULLY, @@ -689,9 +692,11 @@ enum msg_hash_enums MENU_LABEL(XMB_SCALE_FACTOR), MENU_LABEL(XMB_FONT), MENU_LABEL(XMB_THEME), + MENU_LABEL(XMB_MAIN_MENU_ENABLE_SETTINGS), MENU_LABEL(XMB_MENU_COLOR_THEME), MENU_LABEL(XMB_SHADOWS_ENABLE), MENU_LABEL(XMB_SHOW_SETTINGS), + MENU_LABEL(XMB_SHOW_SETTINGS_PASSWORD), MENU_LABEL(XMB_SHOW_FAVORITES), MENU_LABEL(XMB_SHOW_IMAGES), MENU_LABEL(XMB_SHOW_MUSIC),