aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-calendar-view.c24
2 files changed, 15 insertions, 16 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c248829503..5fecac57e7 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2006-02-12 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #329570
+ * gui/e-calendar-view.c: (on_unrecur_appointment):
+ Just remove the instances pass the rid. The exception
+ date will be set in the backend.
+
2006-02-09 Johnny Jacob <johnnyjacob@gmail.com>
Fixes #330521
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 9e10669186..da6b7626db 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1472,7 +1472,8 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
GList *selected;
ECal *client;
char *new_uid;
-
+ ECalComponentId *id = NULL;
+
selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
@@ -1488,13 +1489,9 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- if (e_cal_component_has_recurrences (comp)) {
- e_cal_component_set_recurid (comp, NULL);
- cal_comp_util_add_exdate (comp, event->comp_data->instance_start, e_calendar_view_get_timezone (cal_view));
- e_cal_component_commit_sequence (comp);
- }
+ id = e_cal_component_get_id (comp);
+
/* For the unrecurred instance we duplicate the original object,
create a new uid for it, get rid of the recurrence rules, and set
the start & end times to the instances times. */
@@ -1524,17 +1521,12 @@ 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_component_has_recurrences (comp)) {
- if (!e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), CALOBJ_MOD_ALL, NULL))
- g_message ("on_unrecur_appointment(): Could not update the object!");
- } else {
- ECalComponentId *id = e_cal_component_get_id (comp);
- if (!e_cal_remove_object_with_mod (client, id->uid, id->rid, CALOBJ_MOD_THIS,
- NULL));
- g_message ("on_unrecur_appointment(): Could not remove the old object!");
- }
+ if (!e_cal_remove_object_with_mod (client, id->uid, id->rid, CALOBJ_MOD_THIS,
+ NULL))
+ g_message ("on_unrecur_appointment(): Could not remove the old object!");
+ e_cal_component_free_id (id);
g_object_unref (comp);
if (!e_cal_create_object (client, e_cal_component_get_icalcomponent (new_comp), &new_uid, NULL))