summaryrefslogtreecommitdiff
path: root/src/calcurse.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2006-09-18 08:53:02 +0000
committerFrederic Culot <calcurse@culot.org>2006-09-18 08:53:02 +0000
commitab1b7eacd7043d5ea5bb0d4c58cd1c9a371c21e4 (patch)
tree2e412e6c7761cf958ced1ac5c55084778607e556 /src/calcurse.c
parente767e3ceb759b23c1533be24e3d33791e9dbbe32 (diff)
downloadcalcurse-ab1b7eacd7043d5ea5bb0d4c58cd1c9a371c21e4.zip
added test on warning time interval in config_notify_bar(), plus small bugfixes
Diffstat (limited to 'src/calcurse.c')
-rwxr-xr-xsrc/calcurse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index c964a5f..ca847de 100755
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -1,4 +1,4 @@
-/* $calcurse: calcurse.c,v 1.20 2006/09/17 10:43:54 culot Exp $ */
+/* $calcurse: calcurse.c,v 1.21 2006/09/18 08:53:02 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -216,7 +216,7 @@ int main(int argc, char **argv)
/* Get user input. */
ch = wgetch(swin);
- switch (ch) {
+ if (ch != 10) switch (ch) {
case 9: /* The TAB key was hit. */
reset_status_page();
@@ -849,7 +849,8 @@ void config_notify_bar(void)
case '4':
status_mesg(count_str, "");
getstring(swin, colr, buf, 0, 1);
- if (strlen(buf) != 0) {
+ if (strlen(buf) != 0 && is_all_digit(buf) &&
+ atoi(buf) >= 0 && atoi(buf) <= DAYINSEC) {
pthread_mutex_lock(&nbar->mutex);
nbar->cntdwn = atoi(buf);
pthread_mutex_unlock(&nbar->mutex);
@@ -873,7 +874,7 @@ void print_general_options(WINDOW *win)
char *option6 = _("week_begins_on_monday = ");
x_pos = 3;
- y_pos = 4;
+ y_pos = 3;
mvwprintw(win, y_pos, x_pos, "[1] %s ", option1);
print_option_incolor(win, auto_save, y_pos,