From 9cfacbca72b36382687b45e5de71cc73280cc10e Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 10 Jun 2004 12:04:42 +0000 Subject: Fixes #58799 2004-06-10 Rodrigo Moya Fixes #58799 * gui/e-calendar-view.c (e_calendar_view_delete_selected_occurrence): Use the timezone for getting the RECUR-ID from the instance start date if available. Also, use dates only as the recurrence ID, and do nothing if not a recurrent appointment. svn path=/trunk/; revision=26281 --- calendar/gui/e-calendar-view.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'calendar/gui/e-calendar-view.c') diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index cf0feb531f..12e8ec93b3 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -892,12 +892,26 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view) rid = e_cal_component_get_recurid_as_string (comp); else { ECalComponentDateTime dt; + icaltimezone *zone; + if (!e_cal_component_has_recurrences (comp)) { + g_object_unref (comp); + return; + } + + /* get the RECUR-ID from the start date */ e_cal_component_get_dtstart (comp, &dt); if (dt.value) { - rid = icaltime_as_ical_string (icaltime_from_timet (event->start, dt.value->is_date)); - e_cal_component_free_datetime (&dt); + if (e_cal_get_timezone (event->comp_data->client, dt.tzid, &zone, NULL)) { + rid = icaltime_as_ical_string ( + icaltime_from_timet_with_zone (event->start, TRUE, zone)); + } else { + rid = icaltime_as_ical_string ( + icaltime_from_timet (event->start, TRUE)); + } } + + e_cal_component_free_datetime (&dt); } if (rid) { -- cgit