Skip to content

Commit

Permalink
Menu label finetunes
Browse files Browse the repository at this point in the history
Change quit sublabel depending on config save on exit status.
Update restart and menu driver sublabels.
Restore quit help text display.
  • Loading branch information
zoltanvb committed Jan 20, 2024
1 parent 72c901a commit 3133b83
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
3 changes: 3 additions & 0 deletions intl/msg_hash_us.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ int msg_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
case MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT:
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_CONFIG_SAVE_ON_EXIT), len);
break;
case MENU_ENUM_LABEL_QUIT_RETROARCH:
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_QUIT_RETROARCH), len);
break;
case MENU_ENUM_LABEL_VIDEO_SHADER_FILTER_PASS:
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_VIDEO_SHADER_FILTER_PASS), len);
break;
Expand Down
22 changes: 13 additions & 9 deletions intl/msg_hash_us.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,23 +195,27 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_RESTART_RETROARCH,
"Restart RetroArch"
"Restart"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_RESTART_RETROARCH,
"Restart the program."
"Restart RetroArch application."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
"Quit RetroArch"
"Quit"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Quit the program."
"Quit RetroArch application. Configuration save on exit is enabled."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUIT_RETROARCH_NOSAVE,
"Quit RetroArch application. Configuration save on exit is disabled."
)
MSG_HASH(
MENU_ENUM_LABEL_HELP_QUIT_RETROARCH,
"Quit RetroArch. Killing the program in any hard way (SIGKILL, etc.) will terminate RetroArch without saving the configuration, etc. On Unix-likes, SIGINT/SIGTERM allows a clean deinitialization."
"Quit RetroArch. Killing the program in any hard way (SIGKILL, etc.) will terminate RetroArch without saving the configuration in any case. On Unix-likes, SIGINT/SIGTERM allows a clean deinitialization which includes configuration save if enabled."
)

/* Main Menu > Load Core */
Expand Down Expand Up @@ -1797,7 +1801,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_DRIVER,
"Menu driver to use."
"Menu driver to use. Requires restart."
)
MSG_HASH(
MENU_ENUM_LABEL_HELP_MENU_DRIVER_XMB,
Expand Down Expand Up @@ -7822,15 +7826,15 @@ MSG_HASH( /* FIXME Not RGUI specific */
)
MSG_HASH( /* FIXME Not RGUI specific */
MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY,
"Set start directory for the file browser."
"Set Start Directory for File Browser."
)
MSG_HASH( /* FIXME Not RGUI specific */
MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY,
"Configs"
"Configuration files"
)
MSG_HASH( /* FIXME Not RGUI specific */
MENU_ENUM_SUBLABEL_RGUI_CONFIG_DIRECTORY,
"Set start directory for menu configuration browser."
"Default configuration file is stored in this directory."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH,
Expand Down
15 changes: 14 additions & 1 deletion menu/cbs/menu_cbs_sublabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,20 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_system_information, MENU_
#ifdef HAVE_LAKKA
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_quit_retroarch, MENU_ENUM_SUBLABEL_RESTART_RETROARCH)
#else
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_quit_retroarch, MENU_ENUM_SUBLABEL_QUIT_RETROARCH)

/*DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_quit_retroarch, MENU_ENUM_SUBLABEL_QUIT_RETROARCH)*/
static int action_bind_sublabel_quit_retroarch(file_list_t* list,
unsigned type, unsigned i, const char* label, const char* path, char* s, size_t len)
{
settings_t *settings = config_get_ptr();
bool save_on_exit = settings->bools.config_save_on_exit;
if (save_on_exit)
strlcpy(s, msg_hash_to_str(MENU_ENUM_SUBLABEL_QUIT_RETROARCH), len);
else
strlcpy(s, msg_hash_to_str(MENU_ENUM_SUBLABEL_QUIT_RETROARCH_NOSAVE), len);
return 1;
}

#endif
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_restart_retroarch, MENU_ENUM_SUBLABEL_RESTART_RETROARCH)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_widgets, MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE)
Expand Down
1 change: 1 addition & 0 deletions msg_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,7 @@ enum msg_hash_enums
MENU_LABEL(MENU_SHOW_CONFIGURATIONS),
MENU_LABEL(MENU_SHOW_HELP),
MENU_LABEL(MENU_SHOW_QUIT_RETROARCH),
MENU_ENUM_SUBLABEL_QUIT_RETROARCH_NOSAVE,
MENU_LABEL(MENU_SHOW_RESTART_RETROARCH),
MENU_LABEL(MENU_SHOW_REBOOT),
MENU_LABEL(MENU_SHOW_SHUTDOWN),
Expand Down

0 comments on commit 3133b83

Please sign in to comment.