aboutsummaryrefslogtreecommitdiffstats
path: root/src/day.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2007-01-16 07:53:39 +0000
committerFrederic Culot <calcurse@culot.org>2007-01-16 07:53:39 +0000
commit89811b56e2e66960d91faab2db850d91f80f68e3 (patch)
tree9637a4090f5d590a0a63c1c094bb856b11252beb /src/day.c
parent6bbf3e5f2e6777feeaf19e42d9c8bb5b2da0a428 (diff)
downloadcalcurse-89811b56e2e66960d91faab2db850d91f80f68e3.tar.gz
calcurse-89811b56e2e66960d91faab2db850d91f80f68e3.zip
user canceling now taken into account
Diffstat (limited to 'src/day.c')
-rwxr-xr-xsrc/day.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/day.c b/src/day.c
index dc7df47..11d22bd 100755
--- a/src/day.c
+++ b/src/day.c
@@ -1,8 +1,8 @@
-/* $calcurse: day.c,v 1.16 2006/12/21 14:58:18 culot Exp $ */
+/* $calcurse: day.c,v 1.17 2007/01/16 07:53:39 culot Exp $ */
/*
* Calcurse - text-based organizer
- * Copyright (c) 2004-2006 Frederic Culot
+ * Copyright (c) 2004-2007 Frederic Culot
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -449,9 +449,12 @@ void day_edit_item(int year, int month, int day, int item_num, int colr)
re = recur_get_event(date, nb_item[RECUR_EVNT - 1]);
rpt = re->rpt;
status_mesg(msg_event_recur, choice_event_recur);
- while (ch != STRT && ch != END)
+ while (ch != STRT && ch != END && ch != ESCAPE)
ch = wgetch(swin);
- ch += 2;
+ if (ch == ESCAPE)
+ return;
+ else
+ ch += 2;
break;
case EVNT:
ch = DESC;
@@ -460,13 +463,18 @@ void day_edit_item(int year, int month, int day, int item_num, int colr)
ra = recur_get_apoint(date, nb_item[RECUR_APPT - 1]);
rpt = ra->rpt;
status_mesg(msg_recur, choice_recur);
- while (ch != STRT && ch != END && ch != DESC && ch != REPT)
+ while (ch != STRT && ch != END && ch != DESC &&
+ ch != REPT && ch != ESCAPE)
ch = wgetch(swin);
+ if (ch == ESCAPE)
+ return;
break;
case APPT:
status_mesg(msg_norecur, choice_norecur);
- while (ch != STRT && ch != END && ch != DESC)
+ while (ch != STRT && ch != END && ch != DESC && ch != ESCAPE)
ch = wgetch(swin);
+ if (ch == ESCAPE)
+ return;
break;
}