* cm.c (add_snippet): Don't forget to terminate the string. Gets rid of
occassional garbage at the end of mail snippets.
+ * Ctrl-L now refreshes the screen.
+
+ * `B' disables (and `b' enables) all beeping.
+
+ * Released as 0.3.
+
2005-05-23 Martin Mares <mj@ucw.cz>
* Replaced the `-h' switch by a general interface for setting options.
CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline $(DEBUG) -std=gnu99 -DVERSION=$(VERSION) -DYEAR=$(YEAR)
LDFLAGS=-lncurses
-VERSION=0.2
+VERSION=0.3
YEAR=2005
all: cm
` TAB in reverse direction
Ctrl-R forces full reload of the list (otherwise,
it gets updated incrementally)
+ Ctrl-L redraw screen
0...9 sets minimum priority of mailboxes to show
(0=show all)
+ b, B enable/disable beeping
Examples:
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')
{