From a04e34fddcaf6efa3fea9014e64b6bc13d5afba8 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 15 May 2016 02:15:45 +0100 Subject: [PATCH] Fix output for tray timer setting --- src/command/commands.c | 6 +++++- src/ui/console.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index 3060cf49..177c56bb 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -5880,7 +5880,11 @@ cmd_tray(ProfWin *window, const char *const command, gchar **args) char *err_msg = NULL; gboolean res = strtoi_range(args[1], &intval, 1, 10, &err_msg); if (res) { - cons_show("Tray timer set to %d seconds.", intval); + if (intval == 1) { + cons_show("Tray timer set to 1 second."); + } else { + cons_show("Tray timer set to %d seconds.", intval); + } prefs_set_tray_timer(intval); if (prefs_get_boolean(PREF_TRAY)) { tray_set_timer(intval); diff --git a/src/ui/console.c b/src/ui/console.c index 3f44f133..5c5afbd9 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -1195,7 +1195,11 @@ cons_tray_setting(void) cons_show("Tray icon read (/tray) : OFF"); int seconds = prefs_get_tray_timer(); - cons_show("Tray timer (/tray) : %d seconds", seconds); + if (seconds == 1) { + cons_show("Tray timer (/tray) : 1 second"); + } else { + cons_show("Tray timer (/tray) : %d seconds", seconds); + } } void