If a recurrence of events is set up and one of the events gets
deleted, that event needs to be marked as an exception on the
main event so that it doesn't get recreated any time the main
event is edited.
This commit adds code to manage setting up this exception.
manager: Fix bug where recurring events shift after being edited
Right now if a user edits say event 3 in a set of 5 events, the
whole event set gets shifted over by 3. It's as if the middle
instance event is treated as the new first event.
This is because of a bit of the code that clears the recurrence
id of the event, to get at the "main event", and edit the whole
set. The code retains the start time from the instance, though,
rather than use the start time of the main event it's trying to
update.
This commit queries for the main event from the instance event,
and sets the new main event start time to match the old main
event start time, before doing an update.
event-editor/dialog: Don't show MOD_ALL if schedule changed
We get into seriously tricky situations if we try and change the
date & time of an event with recurrency, and pass MOD_ALL. That's
because it is ambioguous *where* the change must be applied.
Don't allow selecting MOD_ALL when the scheduling of the recurrent
event changes.