aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
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/dialogs
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/dialogs')
-rw-r--r--calendar/gui/dialogs/comp-editor.c13
-rw-r--r--calendar/gui/dialogs/meeting-page.c5
2 files changed, 15 insertions, 3 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);
}
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index f7046853e1..17072c6a2c 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -955,7 +955,7 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
ECal *client)
{
MeetingPagePrivate *priv;
- char *backend_address;
+ char *backend_address = NULL;
EIterator *it;
EAccount *def_account;
GList *address_strings = NULL, *l;
@@ -1005,6 +1005,9 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
}
}
+ if (backend_address)
+ g_free (backend_address);
+
g_object_unref(it);
if (address_strings)