diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-07-11 10:35:49 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-07-11 10:35:49 +0800 |
commit | 24c212a1e2f400804387484b7515823dde4fce4b (patch) | |
tree | 192f1987c49aec88e54618e764c889abe167a49c /calendar/gui/dialogs/comp-editor.c | |
parent | d964dd2e8fe1add89fd6a4788501da6d4ae92375 (diff) | |
download | gsoc2013-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/dialogs/comp-editor.c')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index fe7cba9dfd..3e26effbb4 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -719,7 +719,12 @@ save_comp (CompEditor *editor) e_cal_get_source (priv->source_client)) && cal_comp_is_on_server (priv->comp, priv->source_client)) { /* Comp found a new home. Remove it from old one. */ - e_cal_remove_object (priv->source_client, orig_uid, NULL); + + if (e_cal_component_is_instance (priv->comp) || e_cal_component_has_recurrences (priv->comp)) + e_cal_remove_object_with_mod (priv->source_client, orig_uid, NULL, + CALOBJ_MOD_ALL, NULL); + else + e_cal_remove_object (priv->source_client, orig_uid, NULL); /* Let priv->source_client point to new home, so we can move it * again this session. */ @@ -1159,7 +1164,11 @@ delete_comp (CompEditor *editor) priv = editor->priv; e_cal_component_get_uid (priv->comp, &uid); - e_cal_remove_object (priv->client, uid, NULL); + if (e_cal_component_is_instance (priv->comp)|| e_cal_component_has_recurrences (priv->comp)) + e_cal_remove_object_with_mod (priv->client, uid, NULL, + CALOBJ_MOD_ALL, NULL); + else + e_cal_remove_object (priv->client, uid, NULL); close_dialog (editor); } |