aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-view.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2006-02-10 14:34:55 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2006-02-10 14:34:55 +0800
commit2672a514132dcebab710c90aef78c464708eae6f (patch)
treeedcc6234256c4c9e9756a8baafee1ae72f08c80f /calendar/gui/e-calendar-view.c
parentd45c32b900a7fdeccd7373c00c590008ef5dcf9b (diff)
downloadgsoc2013-evolution-2672a514132dcebab710c90aef78c464708eae6f.tar.gz
gsoc2013-evolution-2672a514132dcebab710c90aef78c464708eae6f.tar.zst
gsoc2013-evolution-2672a514132dcebab710c90aef78c464708eae6f.zip
fixes #329570
svn path=/trunk/; revision=31471
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r--calendar/gui/e-calendar-view.c24
1 files changed, 8 insertions, 16 deletions
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))