summaryrefslogtreecommitdiff
path: root/alpine
diff options
context:
space:
mode:
Diffstat (limited to 'alpine')
-rw-r--r--alpine/alpine.c2
-rw-r--r--alpine/radio.c6
-rw-r--r--alpine/radio.h1
3 files changed, 8 insertions, 1 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 */