diff options
author | Suman Manjunath <msuman@src.gnome.org> | 2008-09-14 16:17:20 +0800 |
---|---|---|
committer | Suman Manjunath <msuman@src.gnome.org> | 2008-09-14 16:17:20 +0800 |
commit | 0418253eff2bc00c1b9ae9f4daa7af82a71b4899 (patch) | |
tree | 9d5b0631457059d7d22a0c13c9e07f5c11490301 /calendar/gui/e-cal-model.c | |
parent | 9f755b0c6d2c880b7d2f44531d513ef0777d1e91 (diff) | |
download | gsoc2013-evolution-0418253eff2bc00c1b9ae9f4daa7af82a71b4899.tar.gz gsoc2013-evolution-0418253eff2bc00c1b9ae9f4daa7af82a71b4899.tar.zst gsoc2013-evolution-0418253eff2bc00c1b9ae9f4daa7af82a71b4899.zip |
Chenthill Palanisamy <pchenthill@novell.com> ** Fix for bug #551628 (Remove old events from the view when objects are modified).
svn path=/trunk/; revision=36322
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r-- | calendar/gui/e-cal-model.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 0b476a4bd5..c97f61ca0f 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -1499,7 +1499,7 @@ e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer user_d /* re-add only the recurrence objects */ for (l = objects; l != NULL; l = g_list_next (l)) { - if (e_cal_util_component_has_recurrences (l->data) && (priv->flags & E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES)) + if (!e_cal_util_component_is_instance (l->data) && e_cal_util_component_has_recurrences (l->data) && (priv->flags & E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES)) list = g_list_prepend (list, l->data); else { int pos; @@ -1507,7 +1507,7 @@ e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer user_d ECalComponentId *id; ECalComponent *comp = e_cal_component_new (); ECal *client = e_cal_view_get_client (query); - + if (!e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (l->data))) { g_object_unref (comp); continue; @@ -1516,13 +1516,34 @@ e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer user_d e_table_model_pre_change (E_TABLE_MODEL (model)); id = e_cal_component_get_id (comp); - + comp_data = search_by_id_and_client (priv, client, id); - icalcomponent_free (comp_data->icalcomp); - + if (comp_data->icalcomp) + icalcomponent_free (comp_data->icalcomp); + if (comp_data->dtstart) { + g_free (comp_data->dtstart); + comp_data->dtstart = NULL; + } + if (comp_data->dtend) { + g_free (comp_data->dtend); + comp_data->dtend = NULL; + } + if (comp_data->due) { + g_free (comp_data->due); + comp_data->due = NULL; + } + if (comp_data->completed) { + g_free (comp_data->completed); + comp_data->completed = NULL; + } + if (comp_data->color) { + g_free (comp_data->color); + comp_data->color = NULL; + } + comp_data->icalcomp = icalcomponent_new_clone (l->data); e_cal_model_set_instance_times (comp_data, priv->zone); - + pos = get_position_in_array (priv->objects, comp_data); e_table_model_row_changed (E_TABLE_MODEL (model), pos); |