aboutsummaryrefslogtreecommitdiffstats
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
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
-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