aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-11-17 08:55:33 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-11-17 08:55:33 +0800
commit2bc14e22e9a7964cc73e6551acfe935f6f4d1b8f (patch)
tree5d359317299b1fd770b8c42f3299ffba6105e114 /calendar/gui/e-cal-model.c
parent7d9d3e3df88c1696ae8da85f11fa1f908c1a1da1 (diff)
downloadgsoc2013-evolution-2bc14e22e9a7964cc73e6551acfe935f6f4d1b8f.tar.gz
gsoc2013-evolution-2bc14e22e9a7964cc73e6551acfe935f6f4d1b8f.tar.zst
gsoc2013-evolution-2bc14e22e9a7964cc73e6551acfe935f6f4d1b8f.zip
emit the added signal for the correct rows
2003-11-16 JP Rosevear <jpr@ximian.com> * gui/e-cal-model.c (e_cal_view_objects_added_cb): emit the added signal for the correct rows svn path=/trunk/; revision=23375
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r--calendar/gui/e-cal-model.c13
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