From 1b829e3159cfdce8b7351ab1aa72348eb87f1c75 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 20 Oct 2016 17:45:35 +0200 Subject: [PATCH] Add another label --- intl/msg_hash_us.c | 7 ++++--- menu/cbs/menu_cbs_sublabel.c | 13 +++++++++++++ msg_hash.h | 3 ++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 4e1bca970b..dd088af13f 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -3024,10 +3024,11 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg) switch (msg) { case MENU_ENUM_SUBLABEL_VIDEO_SETTINGS: - return "Adjusts settings for video output"; + return "Adjusts settings for video output."; case MENU_ENUM_SUBLABEL_AUDIO_SETTINGS: - return "Adjusts settings for audio output"; - + return "Adjusts settings for audio output."; + case MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE: + return "Prevents your system's screensaver from becoming active."; case MSG_VALUE_SHUTTING_DOWN: return "Shutting down"; case MSG_VALUE_REBOOTING: diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 1869f05920..2d53378b8b 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -46,6 +46,16 @@ static int action_bind_sublabel_video_settings_list( return 0; } +static int action_bind_sublabel_suspend_screensaver_enable( + 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_SUSPEND_SCREENSAVER_ENABLE), len); + return 0; +} + static int action_bind_sublabel_audio_settings_list( file_list_t *list, unsigned type, unsigned i, @@ -74,6 +84,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_AUDIO_SETTINGS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_settings_list); break; + case MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_suspend_screensaver_enable); + break; default: case MSG_UNKNOWN: return -1; diff --git a/msg_hash.h b/msg_hash.h index 96bc5fe073..764380c537 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1858,7 +1858,8 @@ enum msg_hash_enums MENU_ENUM_LABEL_CB_CORE_THUMBNAILS_DOWNLOAD, MENU_ENUM_SUBLABEL_VIDEO_SETTINGS, - MENU_ENUM_SUBLABEL_AUDIO_SETTINGS + MENU_ENUM_SUBLABEL_AUDIO_SETTINGS, + MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE };