diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-cal-model.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index bd5a6ec324..699a6d43b2 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -1139,25 +1139,22 @@ e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer user_data ECalModel *model = (ECalModel *) user_data; ECalModelPrivate *priv; GList *l; - int start_row; - - priv = model->priv; - e_table_model_pre_change (E_TABLE_MODEL (model)); + priv = model->priv; - start_row = priv->objects->len ? priv->objects->len - 1 : 0; - for (l = objects; l; l = l->next) { ECalModelComponent *comp_data; + e_table_model_pre_change (E_TABLE_MODEL (model)); + comp_data = g_new0 (ECalModelComponent, 1); comp_data->client = e_cal_view_get_client (query); comp_data->icalcomp = icalcomponent_new_clone (l->data); g_ptr_array_add (priv->objects, comp_data); - } - e_table_model_rows_inserted (E_TABLE_MODEL (model), start_row, priv->objects->len - start_row); + e_table_model_row_inserted (E_TABLE_MODEL (model), priv->objects->len - 1); + } } static void |