static int check_interval = 30;
static int force_refresh;
+static int allow_bells = 1;
static int minimum_priority;
static time_t last_scan_time;
static char *run_cmd = "mutt -f %s";
redraw_all();
refresh();
}
- if (beeeep)
+ if (beeeep && allow_bells)
beep();
}
}
static void
-scan_and_redraw(void)
+print_status(char *status)
{
move(LINES-1, 0);
- printw("Busy...");
- refresh();
- scan();
- move(LINES-1, 0);
+ if (status)
+ printw("%s", status);
clrtoeol();
refresh();
}
+static void
+scan_and_redraw(void)
+{
+ print_status("Busy...");
+ scan();
+ print_status(NULL);
+}
+
static void
move_cursor(int i)
{
scan_and_redraw();
}
break;
+ case 'l' & 0x1f:
+ clearok(stdscr, TRUE);
+ redraw_all();
+ refresh();
+ break;
case 'r' & 0x1f:
force_refresh = 1;
break;
+ case 'b':
+ allow_bells = 1;
+ print_status("Bells and whistles are now enabled. Toot!");
+ break;
+ case 'B':
+ allow_bells = 0;
+ print_status("Bells and whistles are now disabled. Pssst!");
+ break;
default:
if (ch >= '0' && ch <= '9')
{