From ce0da459fbc3349d204616ac58915c8aeaea5c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 25 Oct 2016 10:50:37 +0200 Subject: [PATCH] Sublabel for WiFi settings --- intl/msg_hash_us.c | 2 ++ menu/cbs/menu_cbs_sublabel.c | 13 +++++++++++++ msg_hash.h | 1 + 3 files changed, 16 insertions(+) diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 86bd00afdd..78f378a267 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -3066,6 +3066,8 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg) return "Adjusts settings for audio output."; case MENU_ENUM_SUBLABEL_INPUT_SETTINGS: return "Adjusts settings for joypads, keyboard and mouse."; + case MENU_ENUM_SUBLABEL_WIFI_SETTINGS: + return "Scans for wireless networks and establishes connection."; case MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE: return "Prevents your system's screensaver from becoming active."; case MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES: diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 2120b0a662..14606367ed 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -86,6 +86,16 @@ static int action_bind_sublabel_input_settings_list( return 0; } +static int action_bind_sublabel_wifi_settings_list( + file_list_t *list, + unsigned type, unsigned i, + const char *label, const char *path, + char *s, size_t len) +{ + strlcpy(s, msg_hash_to_str(MENU_ENUM_SUBLABEL_WIFI_SETTINGS), len); + return 0; +} + static int action_bind_sublabel_max_swapchain_images( file_list_t *list, unsigned type, unsigned i, @@ -376,6 +386,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_INPUT_SETTINGS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_settings_list); break; + case MENU_ENUM_LABEL_WIFI_SETTINGS: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_wifi_settings_list); + break; case MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_suspend_screensaver_enable); break; diff --git a/msg_hash.h b/msg_hash.h index 64adc8ba69..45228cc785 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1938,6 +1938,7 @@ enum msg_hash_enums MENU_ENUM_SUBLABEL_VIDEO_SETTINGS, MENU_ENUM_SUBLABEL_AUDIO_SETTINGS, MENU_ENUM_SUBLABEL_INPUT_SETTINGS, + MENU_ENUM_SUBLABEL_WIFI_SETTINGS, MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE, MENU_ENUM_SUBLABEL_FPS_SHOW, MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES,