From a54c54fd76f48ee3d73ca8e246439321a8d11a51 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Mon, 17 May 2004 14:52:34 +0000 Subject: if we don't have a RECURRENCE-ID, remove nothing. 2004-05-17 Rodrigo Moya * gui/e-calendar-view.c (e_calendar_view_delete_selected_occurrence): if we don't have a RECURRENCE-ID, remove nothing. svn path=/trunk/; revision=25924 --- calendar/ChangeLog | 5 +++++ calendar/gui/e-calendar-view.c | 24 +++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 4911f256aa..66fcd848bc 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2004-05-17 Rodrigo Moya + + * gui/e-calendar-view.c (e_calendar_view_delete_selected_occurrence): + if we don't have a RECURRENCE-ID, remove nothing. + 2004-05-17 H P Nadig Fixes #56885 diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 7562d83912..0ea8b5b2e4 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -900,17 +900,19 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view) } } - if (delete_component_dialog (comp, FALSE, 1, e_cal_component_get_vtype (comp), GTK_WIDGET (cal_view))) { - - if (itip_organizer_is_user (comp, event->comp_data->client) - && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)), - event->comp_data->client, - comp, TRUE)) - itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, event->comp_data->client, NULL); - - e_cal_remove_object_with_mod (event->comp_data->client, uid, rid, CALOBJ_MOD_THIS, &error); - delete_error_dialog (error, E_CAL_COMPONENT_EVENT); - g_clear_error (&error); + if (rid) { + if (delete_component_dialog (comp, FALSE, 1, e_cal_component_get_vtype (comp), GTK_WIDGET (cal_view))) { + + if (itip_organizer_is_user (comp, event->comp_data->client) + && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)), + event->comp_data->client, + comp, TRUE)) + itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, event->comp_data->client, NULL); + + e_cal_remove_object_with_mod (event->comp_data->client, uid, rid, CALOBJ_MOD_THIS, &error); + delete_error_dialog (error, E_CAL_COMPONENT_EVENT); + g_clear_error (&error); + } } /* free memory */ -- cgit