diff options
author | JP Rosevear <jpr@helixcode.com> | 2000-10-16 22:03:03 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2000-10-16 22:03:03 +0800 |
commit | 6793123da8bf07d588c2b7c403e8d070ef7d3e91 (patch) | |
tree | 536169756bd79dfe07adb4574eb4c5542bad3392 /calendar/conduits | |
parent | 45e9efcab1f4d35eb8f162f2dd3048f1a4f7c417 (diff) | |
download | gsoc2013-evolution-6793123da8bf07d588c2b7c403e8d070ef7d3e91.tar gsoc2013-evolution-6793123da8bf07d588c2b7c403e8d070ef7d3e91.tar.gz gsoc2013-evolution-6793123da8bf07d588c2b7c403e8d070ef7d3e91.tar.bz2 gsoc2013-evolution-6793123da8bf07d588c2b7c403e8d070ef7d3e91.tar.lz gsoc2013-evolution-6793123da8bf07d588c2b7c403e8d070ef7d3e91.tar.xz gsoc2013-evolution-6793123da8bf07d588c2b7c403e8d070ef7d3e91.tar.zst gsoc2013-evolution-6793123da8bf07d588c2b7c403e8d070ef7d3e91.zip |
Remove pilot cruft. All pilot stuff is in the conduits now and uses the
2000-10-16 JP Rosevear <jpr@helixcode.com>
* cal-client/cal-client.h: Remove pilot cruft. All pilot stuff
is in the conduits now and uses the logging facility.
* pcs/cal-backend-file.c: ditto
* pcs/cal-backend.h: ditto
* pcs/cal-backend.c: ditto
* pcs/cal.c: ditto
* pcs/cal.h: ditto
* idl/evolution-calendar.idl: ditto
* cal-util/cal-component.h: ditto
* cal-util/cal-component.c: ditto
* cal-client/cal-client.c: ditto
* conduits/calendar/calendar-conduit.c (local_record_from_comp):
Take a stab at storing recurrence stuff on the pilot properly
* pcs/cal-backend.c (cal_backend_update_object): Don't log the
event until after the update in case its a new item
svn path=/trunk/; revision=5940
Diffstat (limited to 'calendar/conduits')
-rw-r--r-- | calendar/conduits/calendar/calendar-conduit.c | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 757dd66958..37661377b1 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -415,7 +415,8 @@ local_record_from_comp (ECalLocalRecord *local, CalComponent *comp, ECalConduitC CalComponentDateTime dt; time_t dt_time; CalComponentClassification classif; - + int i; + LOG ("local_record_from_comp\n"); g_return_if_fail (local != NULL); @@ -463,6 +464,44 @@ local_record_from_comp (ECalLocalRecord *local, CalComponent *comp, ECalConduitC local->appt->event = 1; } + /* Recurrence Rules */ + local->appt->repeatType = repeatNone; + + if (cal_component_has_rrules (comp)) { + GSList *list; + struct icalrecurrencetype *recur; + + cal_component_get_rrule_list (comp, &list); + recur = list->data; + + switch (recur->freq) { + case ICAL_DAILY_RECURRENCE: + local->appt->repeatType = repeatDaily; + break; + case ICAL_WEEKLY_RECURRENCE: + local->appt->repeatType = repeatWeekly; + for (i = 0; i<= 7 && recur->by_day[i] != SHRT_MAX; i++) + local->appt->repeatDays[0] = 0; + break; + case ICAL_MONTHLY_RECURRENCE: + if (recur->by_month_day[0] != SHRT_MAX) { + local->appt->repeatType = repeatMonthlyByDate; + } + break; + case ICAL_YEARLY_RECURRENCE: + local->appt->repeatType = repeatYearly; + break; + default: + break; + } + + if (local->appt->repeatType != repeatNone) { + local->appt->repeatFrequency = recur->interval; + } + + cal_component_free_recur_list (list); + } + cal_component_get_classification (comp, &classif); if (classif == CAL_COMPONENT_CLASS_PRIVATE) |