diff options
author | Milan Crha <mcrha@redhat.com> | 2019-03-11 11:44:20 +0100 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2019-03-11 11:44:20 +0100 |
commit | cf2c5e0f02ceaa01a33115164fe7c641b87435b7 (patch) | |
tree | aa8023f2a4dcd5d3cbd6a6948ba38477089174fb | |
parent | ebd8440cefa3c102ac1969afd2dc92a3b7154040 (diff) | |
download | evolution-data-server-cf2c5e0f02ceaa01a33115164fe7c641b87435b7.tar.gz |
ews-I#39 - Let handle recurring task completion by the server
Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/39
-rw-r--r-- | src/calendar/libecal/e-cal-util.c | 3 | ||||
-rw-r--r-- | src/calendar/libecal/e-cal-util.h | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/calendar/libecal/e-cal-util.c b/src/calendar/libecal/e-cal-util.c index 28c8a52a0..71f25fa29 100644 --- a/src/calendar/libecal/e-cal-util.c +++ b/src/calendar/libecal/e-cal-util.c @@ -2210,7 +2210,8 @@ e_cal_util_mark_task_complete_sync (icalcomponent *vtodo, g_return_val_if_fail (icalcomponent_isa (vtodo) == ICAL_VTODO_COMPONENT, FALSE); g_return_val_if_fail (E_IS_CAL_CLIENT (cal_client), FALSE); - if (e_cal_util_component_has_recurrences (vtodo)) { + if (e_cal_util_component_has_recurrences (vtodo) && + !e_client_check_capability (E_CLIENT (cal_client), CAL_STATIC_CAPABILITY_TASK_HANDLE_RECUR)) { gboolean is_last = FALSE, change_count = FALSE; struct icaltimetype new_dtstart = icaltime_null_time (), new_due = icaltime_null_time (); diff --git a/src/calendar/libecal/e-cal-util.h b/src/calendar/libecal/e-cal-util.h index 0bbbd1259..ae0609544 100644 --- a/src/calendar/libecal/e-cal-util.h +++ b/src/calendar/libecal/e-cal-util.h @@ -257,6 +257,16 @@ gboolean e_cal_util_event_dates_match (icalcomponent *icalcomp1, **/ #define CAL_STATIC_CAPABILITY_COMPONENT_COLOR "component-color" +/** + * CAL_STATIC_CAPABILITY_TASK_HANDLE_RECUR: + * + * When the capability is set, the backend handles task recurrence + * completion on its own. This does not imply CAL_STATIC_CAPABILITY_TASK_CAN_RECUR. + * + * Since: 3.34 + **/ +#define CAL_STATIC_CAPABILITY_TASK_HANDLE_RECUR "task-handle-recur" + /* Recurrent events. Management for instances */ icalcomponent * e_cal_util_construct_instance (icalcomponent *icalcomp, struct icaltimetype rid); |