From 9a21decd8d4528c36870a86f631c754b0b63411f Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 21 Jun 2020 20:14:20 -0600 Subject: [PATCH] * 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. --- alpine/alpine.c | 2 +- alpine/radio.c | 6 ++++++ alpine/radio.h | 1 + doc/tech-notes/tech-notes.txt | 2 +- pith/pine.hlp | 11 ++++++++++- 5 files changed, 19 insertions(+), 3 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 */ diff --git a/doc/tech-notes/tech-notes.txt b/doc/tech-notes/tech-notes.txt index 46afd81..4117673 100644 --- a/doc/tech-notes/tech-notes.txt +++ b/doc/tech-notes/tech-notes.txt @@ -1,7 +1,7 @@ Alpine Technical Notes - Version 2.22.1, June 2020 + Version 2.23, June 2020 Table of Contents diff --git a/pith/pine.hlp b/pith/pine.hlp index 53fbe77..8c4ca2e 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 453 2020-06-18 15:08:35 +Alpine Commit 455 2020-06-21 20:14:16 ============= h_news ================= @@ -184,6 +184,15 @@ This is a development version of Alpine. These enhancements are released after the release of version 2.22. Please report any problems you find with this release. +

Additions include: + +

+

New in Alpine ()

Additions include: -- 2.11.4.GIT