aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-view.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-07-11 10:35:49 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-07-11 10:35:49 +0800
commit24c212a1e2f400804387484b7515823dde4fce4b (patch)
tree192f1987c49aec88e54618e764c889abe167a49c /calendar/gui/e-calendar-view.c
parentd964dd2e8fe1add89fd6a4788501da6d4ae92375 (diff)
downloadgsoc2013-evolution-24c212a1e2f400804387484b7515823dde4fce4b.tar.gz
gsoc2013-evolution-24c212a1e2f400804387484b7515823dde4fce4b.tar.zst
gsoc2013-evolution-24c212a1e2f400804387484b7515823dde4fce4b.zip
Use e_cal_remove_object for non-recurring appointments. Fixed some memory leaks.
svn path=/trunk/; revision=29703
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r--calendar/gui/e-calendar-view.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 8d65a7808d..df35cccf4b 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -691,7 +691,8 @@ e_calendar_view_cut_clipboard (ECalendarView *cal_view)
&error);
icalcomponent_free (icalcomp);
} else
- e_cal_remove_object (event->comp_data->client, uid, &error);
+ e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL,
+ CALOBJ_MOD_ALL, &error);
} else
e_cal_remove_object (event->comp_data->client, uid, &error);
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
@@ -864,7 +865,10 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
return;
}
- e_cal_remove_object (event->comp_data->client, uid, &error);
+ if (e_cal_util_component_is_instance (event->comp_data->icalcomp) || e_cal_util_component_is_instance (event->comp_data->icalcomp))
+ e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL, CALOBJ_MOD_ALL, &error);
+ else
+ e_cal_remove_object (event->comp_data->client, uid, &error);
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
@@ -1178,8 +1182,13 @@ transfer_item_to (ECalendarViewEvent *event, ECal *dest_client, gboolean remove_
}
/* remove the item from the source calendar */
- if (remove_item)
- e_cal_remove_object (event->comp_data->client, uid, NULL);
+ if (remove_item) {
+ if (e_cal_util_component_is_instance (event->comp_data->icalcomp) || e_cal_util_component_is_instance (event->comp_data->icalcomp))
+ e_cal_remove_object_with_mod (event->comp_data->client, uid,
+ NULL, CALOBJ_MOD_ALL, NULL);
+ else
+ e_cal_remove_object (event->comp_data->client, uid, NULL);
+ }
}
static void
@@ -1326,9 +1335,7 @@ on_delegate (EPopup *ep, EPopupItem *pitem, void *data)
selected = e_calendar_view_get_selected_events (cal_view);
if (selected) {
ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
- char *address;
- e_cal_get_cal_address (event->comp_data->client, &address, NULL);
clone = icalcomponent_new_clone (event->comp_data->icalcomp);
set_attendee_status_for_delegate (clone, event->comp_data->client);