summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-06-21 20:14:20 -0600
committerEduardo Chappa <chappa@washington.edu>2020-06-21 20:14:20 -0600
commit9a21decd8d4528c36870a86f631c754b0b63411f (patch)
tree90aa846885b727da819eb8412537be96a691f66c
parent729b8c0f554d95388e228d9b07d628530f8fa736 (diff)
downloadalpine-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.
-rw-r--r--alpine/alpine.c2
-rw-r--r--alpine/radio.c6
-rw-r--r--alpine/radio.h1
-rw-r--r--doc/tech-notes/tech-notes.txt2
-rw-r--r--pith/pine.hlp11
5 files changed, 19 insertions, 3 deletions
diff --git a/alpine/alpine.c b/alpine/alpine.c
index d72c60cf..e11a47c7 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 65355a8b..40b99211 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 ea18529f..6a58b197 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 46afd811..41176733 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 53fbe773..8c4ca2e3 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 =================
<HTML>
<HEAD>
@@ -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.
+<P> Additions include:
+
+<UL>
+<LI> 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.
+</UL>
+
<H2>New in Alpine <!--#echo var="ALPINE_VERSION"--> (<!--#echo var="ALPINE_REVISION"-->)</H2>
<P> Additions include: