aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@novell.com>2004-12-09 20:41:49 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-12-09 20:41:49 +0800
commitf798cc83cdd529779285a72aad688b2741fda6bd (patch)
treecf1c5729769e27085b1579b56a6ac3768a16ed50
parent6d387073ebfcdeeba4da9045c830f68f284ae397 (diff)
downloadgsoc2013-evolution-f798cc83cdd529779285a72aad688b2741fda6bd.tar
gsoc2013-evolution-f798cc83cdd529779285a72aad688b2741fda6bd.tar.gz
gsoc2013-evolution-f798cc83cdd529779285a72aad688b2741fda6bd.tar.bz2
gsoc2013-evolution-f798cc83cdd529779285a72aad688b2741fda6bd.tar.lz
gsoc2013-evolution-f798cc83cdd529779285a72aad688b2741fda6bd.tar.xz
gsoc2013-evolution-f798cc83cdd529779285a72aad688b2741fda6bd.tar.zst
gsoc2013-evolution-f798cc83cdd529779285a72aad688b2741fda6bd.zip
keep a local copy of the ECal.
2003-12-09 Rodrigo Moya <rodrigo@novell.com> * gui/e-calendar-view.c (on_unrecur_appointment): keep a local copy of the ECal. svn path=/trunk/; revision=28101
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/e-calendar-view.c21
2 files changed, 23 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 6de79506a4..21d9dd3104 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-09 Rodrigo Moya <rodrigo@novell.com>
+
+ * gui/e-calendar-view.c (on_unrecur_appointment): keep a local copy
+ of the ECal.
+
2004-12-08 Hans Petter Jansson <hpj@novell.com>
* gui/e-meeting-list-view.c
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index c35dbd95fe..ad2020b9f3 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -921,8 +921,20 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *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))
+ comp, TRUE)) {
+ if (!e_cal_component_is_instance (comp)) {
+ ECalComponentRange range;
+
+ /* set the recurrence ID of the object we send */
+ range.type = E_CAL_COMPONENT_RANGE_SINGLE;
+ e_cal_component_get_dtstart (comp, &range.datetime);
+ range.datetime.value->is_date = 1;
+ e_cal_component_set_recurid (comp, &range);
+
+ e_cal_component_free_datetime (&range.datetime);
+ }
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);
@@ -1253,6 +1265,7 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
ECalComponentDateTime date;
struct icaltimetype itt;
GList *selected;
+ ECal *client;
char *new_uid;
selected = e_calendar_view_get_selected_events (cal_view);
@@ -1260,6 +1273,7 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
return;
event = (ECalendarViewEvent *) selected->data;
+ client = g_object_ref (event->comp_data->client);
date.value = &itt;
date.tzid = NULL;
@@ -1299,17 +1313,18 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
/* Now update both ECalComponents. Note that we do this last since at
* present the updates happen synchronously so our event may disappear.
*/
- if (!e_cal_modify_object (event->comp_data->client, e_cal_component_get_icalcomponent (comp), CALOBJ_MOD_THIS, NULL))
+ if (!e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), CALOBJ_MOD_THIS, NULL))
g_message ("e_day_view_on_unrecur_appointment(): Could not update the object!");
g_object_unref (comp);
- if (!e_cal_create_object (event->comp_data->client, e_cal_component_get_icalcomponent (new_comp), &new_uid, NULL))
+ if (!e_cal_create_object (client, e_cal_component_get_icalcomponent (new_comp), &new_uid, NULL))
g_message ("e_day_view_on_unrecur_appointment(): Could not update the object!");
else
g_free (new_uid);
g_object_unref (new_comp);
+ g_object_unref (client);
g_list_free (selected);
}