diff options
author | Eduardo Chappa <chappa@washington.edu> | 2020-06-21 20:14:20 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2020-06-21 20:14:20 -0600 |
commit | 9a21decd8d4528c36870a86f631c754b0b63411f (patch) | |
tree | 90aa846885b727da819eb8412537be96a691f66c /alpine | |
parent | 729b8c0f554d95388e228d9b07d628530f8fa736 (diff) | |
download | alpine-9a21decd8d4528c36870a86f631c754b0b63411f.tar.xz |
* Alpine will ding the terminal bell when asking about quitting
when new mail arrives. This is consistent with Alpine dinging the
bell when new mail arrives. Bell will not ding if it is disabled
for status messages. Suggested by Chime Hart.
Diffstat (limited to 'alpine')
-rw-r--r-- | alpine/alpine.c | 2 | ||||
-rw-r--r-- | alpine/radio.c | 6 | ||||
-rw-r--r-- | alpine/radio.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/alpine/alpine.c b/alpine/alpine.c index d72c60c..e11a47c 100644 --- a/alpine/alpine.c +++ b/alpine/alpine.c @@ -3232,7 +3232,7 @@ quit_screen(struct pine *pine_state) && pine_state->mail_stream != NULL && new_mail(1, VeryBadTime, NM_STATUS_MSG | NM_DEFER_SORT) > 0 && (quit = want_to(_("Quit even though new mail just arrived"), 'y', 0, - NO_HELP, WT_NORM)) != 'y'){ + NO_HELP, WT_NORM | WT_DING)) != 'y'){ refresh_sort(pine_state->mail_stream, pine_state->msgmap, SRT_VRB); pine_state->next_screen = pine_state->prev_screen; return; diff --git a/alpine/radio.c b/alpine/radio.c index 65355a8..40b9921 100644 --- a/alpine/radio.c +++ b/alpine/radio.c @@ -107,6 +107,7 @@ pre_screen_config_want_to(char *question, int dflt, int on_ctrl_C) on_ctrl_C -- Answer returned on ^C help -- Two line help text flags -- Flags to modify behavior + WT_DING - ding the bell when asking. WT_FLUSH_IN - Discard pending input. WT_SEQ_SENSITIVE - Caller is sensitive to sequence number changes caused by @@ -123,6 +124,11 @@ want_to(char *question, int dflt, int on_ctrl_C, HelpType help, int flags) int rv, width; size_t len; + if((flags & WT_DING) && F_OFF(F_QUELL_BEEPS, ps_global)){ + Writechar(BELL, 0); + fflush(stdout); + } + if(!ps_global->ttyo) return(pre_screen_config_want_to(question, dflt, on_ctrl_C)); #ifdef _WINDOWS diff --git a/alpine/radio.h b/alpine/radio.h index ea18529..6a58b19 100644 --- a/alpine/radio.h +++ b/alpine/radio.h @@ -68,6 +68,7 @@ typedef struct esckey { #define WT_NORM 0x00 /* flags modifying want_to */ #define WT_FLUSH_IN 0x01 /* discard pending input */ #define WT_SEQ_SENSITIVE 0x02 /* Sensitive to seq # changes */ +#define WT_DING 0x04 /* Question needs attention! */ /* exported prototypes */ |