aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/e-cal-model.c13
2 files changed, 10 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 7183af147d..a09b76a9a9 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,10 @@
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
+
+2003-11-16 JP Rosevear <jpr@ximian.com>
+
* gui/tasks-component.c (is_in_uids): copy in here
(update_uris_for_selection): save the selection
(update_selection): update the selection when its changed
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