aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2004-03-15 19:29:30 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-03-15 19:29:30 +0800
commit3662d9bca108622527746d8e9ce1117d584cab00 (patch)
tree5d8a3618a08eef55753ded4536022db2c35e35a0 /calendar
parent8f1fd2e906395b1b0143b906015d2d14d84de311 (diff)
downloadgsoc2013-evolution-3662d9bca108622527746d8e9ce1117d584cab00.tar
gsoc2013-evolution-3662d9bca108622527746d8e9ce1117d584cab00.tar.gz
gsoc2013-evolution-3662d9bca108622527746d8e9ce1117d584cab00.tar.bz2
gsoc2013-evolution-3662d9bca108622527746d8e9ce1117d584cab00.tar.lz
gsoc2013-evolution-3662d9bca108622527746d8e9ce1117d584cab00.tar.xz
gsoc2013-evolution-3662d9bca108622527746d8e9ce1117d584cab00.tar.zst
gsoc2013-evolution-3662d9bca108622527746d8e9ce1117d584cab00.zip
Fixes #35577
2004-03-15 Rodrigo Moya <rodrigo@ximian.com> Fixes #35577 * gui/e-cal-view.c (e_calendar_view_delete_selected_occurrence): if the component is an instance, pass the recurrence ID to e_cal_remove_object_with_mod. Also, make the user confirm the deletion, and send the cancellation message for meetings. svn path=/trunk/; revision=25066
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/e-cal-view.c28
-rw-r--r--calendar/gui/e-calendar-view.c28
3 files changed, 53 insertions, 12 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 5908cd9249..2601312fb9 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2004-03-15 Rodrigo Moya <rodrigo@ximian.com>
+
+ Fixes #35577
+
+ * gui/e-cal-view.c (e_calendar_view_delete_selected_occurrence):
+ if the component is an instance, pass the recurrence ID to
+ e_cal_remove_object_with_mod. Also, make the user confirm the
+ deletion, and send the cancellation message for meetings.
+
2004-03-12 Not Zed <NotZed@Ximian.com>
* gui/e-cal-model.c (ecm_initialize_value): return "" instead of
diff --git a/calendar/gui/e-cal-view.c b/calendar/gui/e-cal-view.c
index b02b51e6ff..bb33b9bfc4 100644
--- a/calendar/gui/e-cal-view.c
+++ b/calendar/gui/e-cal-view.c
@@ -944,8 +944,9 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
{
ECalendarViewEvent *event;
GList *selected;
- const char *uid;
+ const char *uid, *rid;
GError *error = NULL;
+ ECalComponent *comp;
selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
@@ -953,15 +954,30 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
event = (ECalendarViewEvent *) selected->data;
- uid = icalcomponent_get_uid (event->comp_data->icalcomp);
- /* FIXME: use 'rid' argument */
- e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL, CALOBJ_MOD_THIS, &error);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ e_cal_component_get_uid (comp, &uid);
+ if (e_cal_component_is_instance (comp))
+ rid = e_cal_component_get_recur_id_as_string (comp);
+ else
+ 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);
- delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
- g_clear_error (&error);
+ 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 */
g_list_free (selected);
+ g_object_unref (comp);
}
static void
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index b02b51e6ff..bb33b9bfc4 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -944,8 +944,9 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
{
ECalendarViewEvent *event;
GList *selected;
- const char *uid;
+ const char *uid, *rid;
GError *error = NULL;
+ ECalComponent *comp;
selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
@@ -953,15 +954,30 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
event = (ECalendarViewEvent *) selected->data;
- uid = icalcomponent_get_uid (event->comp_data->icalcomp);
- /* FIXME: use 'rid' argument */
- e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL, CALOBJ_MOD_THIS, &error);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ e_cal_component_get_uid (comp, &uid);
+ if (e_cal_component_is_instance (comp))
+ rid = e_cal_component_get_recur_id_as_string (comp);
+ else
+ 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);
- delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
- g_clear_error (&error);
+ 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 */
g_list_free (selected);
+ g_object_unref (comp);
}
static void