From c0468154002e682401fe1b91fd01138f36dee66e Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Mon, 20 Sep 2004 13:08:47 +0000 Subject: Fixes #55172 2004-09-15 JP Rosevear Fixes #55172 * conduits/calendar/calendar-conduit.c (local_record_from_comp): handle -1 (last) for monthly recurrences and check both by_set_pos and by_day since either can indicate this type of recurrence svn path=/trunk/; revision=27308 --- calendar/ChangeLog | 8 ++++++++ calendar/conduits/calendar/calendar-conduit.c | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 7220810799..9fb85e8b8e 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2004-09-15 JP Rosevear + + Fixes #55172 + + * conduits/calendar/calendar-conduit.c (local_record_from_comp): + handle -1 (last) for monthly recurrences and check both by_set_pos + and by_day since either can indicate this type of recurrence + 2004-09-20 Tony Tsui Fixes #66174 diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 4c56422513..7f47140196 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -892,9 +892,11 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit break; } - /* FIX ME Not going to work with -ve by_day */ + /* Not going to work with -ve by_day/by_set_pos other than -1, + * pilot doesn't support that anyhow */ local->appt->repeatType = repeatMonthlyByDay; - switch (icalrecurrencetype_day_position (recur->by_day[0])) { + switch (recur->by_set_pos[0] != ICAL_RECURRENCE_ARRAY_MAX ? recur->by_set_pos[0] + : icalrecurrencetype_day_position (recur->by_day[0])) { case 1: local->appt->repeatDay = dom1stSun; break; @@ -907,6 +909,7 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit case 4: local->appt->repeatDay = dom4thSun; break; + case -1: case 5: local->appt->repeatDay = domLastSun; break; -- cgit