[evolution-ews] Set AllDayEvent property in ical
- From: Pavel Ocheretny <pocheretny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Set AllDayEvent property in ical
- Date: Sun, 21 Aug 2011 09:51:40 +0000 (UTC)
commit aff434945edf65b38a946bf54ae8eaf1c0d036f2
Author: Pavel Ocheretny <pavel ocheretny intel com>
Date: Sun Aug 21 12:46:12 2011 +0300
Set AllDayEvent property in ical
src/calendar/e-cal-backend-ews.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index fa6db59..13b49b4 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -2960,6 +2960,26 @@ add_item_to_cache (ECalBackendEws *cbews, EEwsItem *item)
}
}
+ /*AllDayEvent*/
+ for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
+ icalprop != NULL;
+ icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
+
+ if (g_strcmp0(icalproperty_get_x_name(icalprop), "X-MICROSOFT-CDO-ALLDAYEVENT") == 0) {
+ if (g_strcmp0(icalproperty_get_value_as_string(icalprop), "TRUE") == 0) {
+ struct icaltimetype dtend, dtstart;
+ dtstart = icalcomponent_get_dtstart (icalcomp);
+ dtstart.is_date = 1;
+ icalcomponent_set_dtstart (icalcomp, dtstart);
+
+ dtend = icalcomponent_get_dtend (icalcomp);
+ dtend.is_date = 1;
+ icalcomponent_set_dtend (icalcomp, dtend);
+ }
+ break;
+ }
+ }
+
if (icalcomponent_get_first_property (icalcomp, ICAL_RECURRENCEID_PROPERTY)) {
/* Exchange sets RRULE even on the children, which is broken */
icalprop = icalcomponent_get_first_property (icalcomp, ICAL_RRULE_PROPERTY);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]