diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-01-13 17:44:48 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-01-13 17:44:48 +0800 |
commit | 648299572f0fa56e6ea260329cd8e616e12957fb (patch) | |
tree | 736ff6b87b6899eca25b303d02efbeaf70bfe3cd | |
parent | 493aec8284d11bb5722278bb5aa289e4fd053bbb (diff) | |
download | gsoc2013-evolution-648299572f0fa56e6ea260329cd8e616e12957fb.tar.gz gsoc2013-evolution-648299572f0fa56e6ea260329cd8e616e12957fb.tar.zst gsoc2013-evolution-648299572f0fa56e6ea260329cd8e616e12957fb.zip |
fixes #313112
svn path=/trunk/; revision=31161
-rw-r--r-- | calendar/ChangeLog | 8 | ||||
-rw-r--r-- | calendar/gui/e-calendar-view.c | 17 |
2 files changed, 21 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 9260eeeee5..050c6201e7 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,4 +1,10 @@ -2006-01-14 Chenthill Palanisamy <pchenthill@novell.com> +2006-01-13 Chenthill Palanisamy <pchenthill@novell.com> + + Fixes #313112 + * gui/e-calendar-view.c: (on_unrecur_appointment): + Remove the old instance if its a detached instance. + +2006-01-13 Chenthill Palanisamy <pchenthill@novell.com> Fixes #259505 * gui/gnome-cal.c: diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 95eca81959..3de3c090d9 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -1449,9 +1449,12 @@ 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)); - 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); + + 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); + } /* For the unrecurred instance we duplicate the original object, create a new uid for it, get rid of the recurrence rules, and set @@ -1482,8 +1485,16 @@ 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!"); + } g_object_unref (comp); |