From 0418253eff2bc00c1b9ae9f4daa7af82a71b4899 Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Sun, 14 Sep 2008 08:17:20 +0000 Subject: Chenthill Palanisamy ** Fix for bug #551628 (Remove old events from the view when objects are modified). svn path=/trunk/; revision=36322 --- calendar/gui/e-day-view.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'calendar/gui/e-day-view.c') diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index f1fb84cd3c..a5df99a0b7 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -555,12 +555,30 @@ update_row (EDayView *day_view, int row) { ECalModelComponent *comp_data; ECalModel *model; + gint day, event_num; + const char *uid = NULL; + char *rid = NULL; e_day_view_stop_editing_event (day_view); model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)); comp_data = e_cal_model_get_component_at (model, row); g_return_if_fail (comp_data != NULL); + + uid = icalcomponent_get_uid (comp_data->icalcomp); + if (e_cal_util_component_is_instance (comp_data->icalcomp)) { + icalproperty *prop; + + prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_RECURRENCEID_PROPERTY); + if (prop) + rid = icaltime_as_ical_string (icalcomponent_get_recurrenceid (comp_data->icalcomp)); + } + + if (e_day_view_find_event_from_uid (day_view, comp_data->client, uid, rid, &day, &event_num)) + e_day_view_remove_event_cb (day_view, day, event_num, NULL); + + g_free (rid); + process_component (day_view, comp_data); gtk_widget_queue_draw (day_view->top_canvas); @@ -641,7 +659,6 @@ model_comps_deleted_cb (ETableModel *etm, gpointer data, gpointer user_data) const char *uid = NULL; char *rid = NULL; - uid = icalcomponent_get_uid (comp_data->icalcomp); if (e_cal_util_component_is_instance (comp_data->icalcomp)) { icalproperty *prop; -- cgit v1.2.3