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>
This commit is contained in:
parent
30639ef6de
commit
ed9b22bd9b
18
src/ui-day.c
18
src/ui-day.c
@ -327,14 +327,15 @@ void ui_day_item_edit(void)
|
|||||||
break;
|
break;
|
||||||
case RECUR_APPT:
|
case RECUR_APPT:
|
||||||
ra = p->item.rapt;
|
ra = p->item.rapt;
|
||||||
const char *choice_recur_appt[4] = {
|
const char *choice_recur_appt[5] = {
|
||||||
_("Start time"),
|
_("Start time"),
|
||||||
_("End time"),
|
_("End time"),
|
||||||
_("Description"),
|
_("Description"),
|
||||||
_("Repetition"),
|
_("Repetition"),
|
||||||
|
_("Move"),
|
||||||
};
|
};
|
||||||
switch (status_ask_simplechoice
|
switch (status_ask_simplechoice
|
||||||
(_("Edit: "), choice_recur_appt, 4)) {
|
(_("Edit: "), choice_recur_appt, 5)) {
|
||||||
case 1:
|
case 1:
|
||||||
need_check_notify = 1;
|
need_check_notify = 1;
|
||||||
update_start_time(&ra->start, &ra->dur, 1);
|
update_start_time(&ra->start, &ra->dur, 1);
|
||||||
@ -352,19 +353,24 @@ void ui_day_item_edit(void)
|
|||||||
need_check_notify = 1;
|
need_check_notify = 1;
|
||||||
update_rept(&ra->rpt, ra->start);
|
update_rept(&ra->rpt, ra->start);
|
||||||
break;
|
break;
|
||||||
|
case 5:
|
||||||
|
need_check_notify = 1;
|
||||||
|
update_start_time(&ra->start, &ra->dur, 0);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case APPT:
|
case APPT:
|
||||||
a = p->item.apt;
|
a = p->item.apt;
|
||||||
const char *choice_appt[3] = {
|
const char *choice_appt[4] = {
|
||||||
_("Start time"),
|
_("Start time"),
|
||||||
_("End time"),
|
_("End time"),
|
||||||
_("Description"),
|
_("Description"),
|
||||||
|
_("Move"),
|
||||||
};
|
};
|
||||||
switch (status_ask_simplechoice
|
switch (status_ask_simplechoice
|
||||||
(_("Edit: "), choice_appt, 3)) {
|
(_("Edit: "), choice_appt, 4)) {
|
||||||
case 1:
|
case 1:
|
||||||
need_check_notify = 1;
|
need_check_notify = 1;
|
||||||
update_start_time(&a->start, &a->dur, 1);
|
update_start_time(&a->start, &a->dur, 1);
|
||||||
@ -378,6 +384,10 @@ void ui_day_item_edit(void)
|
|||||||
notify_same_item(a->start);
|
notify_same_item(a->start);
|
||||||
update_desc(&a->mesg);
|
update_desc(&a->mesg);
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
need_check_notify = 1;
|
||||||
|
update_start_time(&a->start, &a->dur, 0);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user