]> git.draconx.ca Git - gentoo-draconx.git/blob - gnome-extra/evolution-mapi/files/evolution-mapi-3.24-libical-3.patch
evolution-mapi: Fix compatibility with libical-3
[gentoo-draconx.git] / gnome-extra / evolution-mapi / files / evolution-mapi-3.24-libical-3.patch
1 From 092a148dd27dafbe9493aada43c1141ff5f691e2 Mon Sep 17 00:00:00 2001
2 From: Milan Crha <mcrha@redhat.com>
3 Date: Wed, 4 Oct 2017 12:01:39 +0200
4 Subject: [PATCH] Use icaltime_is_utc() instead of icaltimetype::is_utc
5
6 The structure member is going to be removed from libical in the next release
7 and the function is available for a long time, thus it's safe to replace
8 the usage in the code.
9 ---
10  src/libexchangemapi/e-mapi-cal-tz-utils.c |  2 +-
11  src/libexchangemapi/e-mapi-cal-utils.c    | 15 ++++++++++++---
12  2 files changed, 13 insertions(+), 4 deletions(-)
13
14 diff --git a/src/libexchangemapi/e-mapi-cal-tz-utils.c b/src/libexchangemapi/e-mapi-cal-tz-utils.c
15 index 72abe0cae993..af0b1a4fa071 100644
16 --- a/src/libexchangemapi/e-mapi-cal-tz-utils.c
17 +++ b/src/libexchangemapi/e-mapi-cal-tz-utils.c
18 @@ -94,7 +94,7 @@ e_mapi_tm_to_icaltimetype (struct tm *tm,
19         itt.month = dst ? 6 : 1;
20         itt.year = tm->tm_year + 1900;
21  
22 -       itt.is_utc = 0;
23 +       itt.zone = NULL;
24         itt.is_date = 0;
25  
26         return itt;
27 diff --git a/src/libexchangemapi/e-mapi-cal-utils.c b/src/libexchangemapi/e-mapi-cal-utils.c
28 index 2b1bb536e5b9..18afdcb38828 100644
29 --- a/src/libexchangemapi/e-mapi-cal-utils.c
30 +++ b/src/libexchangemapi/e-mapi-cal-utils.c
31 @@ -2177,20 +2177,29 @@ e_mapi_cal_utils_comp_to_object (EMapiConnection *conn,
32                         prop = icalcomponent_get_first_property (ical_comp, ICAL_COMPLETED_PROPERTY);
33                         completed = icalproperty_get_completed (prop);
34  
35 -                       completed.hour = completed.minute = completed.second = 0; completed.is_date = completed.is_utc = 1;
36 +                       completed.hour = completed.minute = completed.second = 0;
37 +                       completed.is_date = 1;
38 +                       completed.zone = utc_zone;
39 +
40                         tt = icaltime_as_timet (completed);
41                         set_timet_value (PidLidTaskDateCompleted, tt);
42                 }
43  
44                 /* Start */
45 -               dtstart.hour = dtstart.minute = dtstart.second = 0; dtstart.is_date = dtstart.is_utc = 1;
46 +               dtstart.hour = dtstart.minute = dtstart.second = 0;
47 +               dtstart.is_date = 1;
48 +               dtstart.zone = utc_zone;
49 +
50                 tt = icaltime_as_timet (dtstart);
51                 if (!icaltime_is_null_time (dtstart)) {
52                         set_timet_value (PidLidTaskStartDate, tt);
53                 }
54  
55                 /* Due */
56 -               dtend.hour = dtend.minute = dtend.second = 0; dtend.is_date = dtend.is_utc = 1;
57 +               dtend.hour = dtend.minute = dtend.second = 0;
58 +               dtend.is_date = 1;
59 +               dtend.zone = utc_zone;
60 +
61                 tt = icaltime_as_timet (dtend);
62                 if (!icaltime_is_null_time (dtend)) {
63                         set_timet_value (PidLidTaskDueDate, tt);
64 -- 
65 2.19.2
66