mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Fix output for tray timer setting
This commit is contained in:
parent
c6a6e3a51c
commit
a04e34fddc
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user