diff options
-rw-r--r-- | calendar/ChangeLog | 9 | ||||
-rw-r--r-- | calendar/gui/e-calendar-view.c | 18 |
2 files changed, 25 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8a5fc41c6d..8c862ae165 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2004-06-10 Rodrigo Moya <rodrigo@novell.com> + + 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. + 2004-06-09 JP Rosevear <jpr@novell.com> * gui/gnome-cal.c (get_times_for_views): calculate the work week, 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) { |