aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2013-07-18 12:19:06 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2013-07-18 12:19:06 +0200
commited9b22bd9b3e8ac2018cfb82cfceb5455c1a9d69 (patch)
treef418d9aa559463ae48055c572944921d2c5aef4d
parent30639ef6de19e64ac1f29ff61644aabd9861429c (diff)
downloadcalcurse-ed9b22bd9b3e8ac2018cfb82cfceb5455c1a9d69.tar.gz
calcurse-ed9b22bd9b3e8ac2018cfb82cfceb5455c1a9d69.zip
Add support for moving appointments
This adds an edit option to change an appointment's start time without changing its duration. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
-rw-r--r--src/ui-day.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/ui-day.c b/src/ui-day.c
index c441398..847b2da 100644
--- a/src/ui-day.c
+++ b/src/ui-day.c
@@ -327,14 +327,15 @@ void ui_day_item_edit(void)
break;
case RECUR_APPT:
ra = p->item.rapt;
- const char *choice_recur_appt[4] = {
+ const char *choice_recur_appt[5] = {
_("Start time"),
_("End time"),
_("Description"),
_("Repetition"),
+ _("Move"),
};
switch (status_ask_simplechoice
- (_("Edit: "), choice_recur_appt, 4)) {
+ (_("Edit: "), choice_recur_appt, 5)) {
case 1:
need_check_notify = 1;
update_start_time(&ra->start, &ra->dur, 1);
@@ -352,19 +353,24 @@ void ui_day_item_edit(void)
need_check_notify = 1;
update_rept(&ra->rpt, ra->start);
break;
+ case 5:
+ need_check_notify = 1;
+ update_start_time(&ra->start, &ra->dur, 0);
+ break;
default:
return;
}
break;
case APPT:
a = p->item.apt;
- const char *choice_appt[3] = {
+ const char *choice_appt[4] = {
_("Start time"),
_("End time"),
_("Description"),
+ _("Move"),
};
switch (status_ask_simplechoice
- (_("Edit: "), choice_appt, 3)) {
+ (_("Edit: "), choice_appt, 4)) {
case 1:
need_check_notify = 1;
update_start_time(&a->start, &a->dur, 1);
@@ -378,6 +384,10 @@ void ui_day_item_edit(void)
notify_same_item(a->start);
update_desc(&a->mesg);
break;
+ case 4:
+ need_check_notify = 1;
+ update_start_time(&a->start, &a->dur, 0);
+ break;
default:
return;
}