aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2008-09-08 17:31:56 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2008-09-08 17:31:56 +0800
commitd620820eab5d5f3814debb1b5f0dc7c5a7138973 (patch)
treebdc2e6435990c7425142b18acfac1148dea90978 /calendar/gui/e-day-view.c
parentc61bef657d2e6c8ab82573f6366761000881db9e (diff)
downloadgsoc2013-evolution-d620820eab5d5f3814debb1b5f0dc7c5a7138973.tar
gsoc2013-evolution-d620820eab5d5f3814debb1b5f0dc7c5a7138973.tar.gz
gsoc2013-evolution-d620820eab5d5f3814debb1b5f0dc7c5a7138973.tar.bz2
gsoc2013-evolution-d620820eab5d5f3814debb1b5f0dc7c5a7138973.tar.lz
gsoc2013-evolution-d620820eab5d5f3814debb1b5f0dc7c5a7138973.tar.xz
gsoc2013-evolution-d620820eab5d5f3814debb1b5f0dc7c5a7138973.tar.zst
gsoc2013-evolution-d620820eab5d5f3814debb1b5f0dc7c5a7138973.zip
Fixes #544187.
svn path=/trunk/; revision=36276
Diffstat (limited to 'calendar/gui/e-day-view.c')
-rw-r--r--calendar/gui/e-day-view.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index ebf17eff78..f1fb84cd3c 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -624,10 +624,10 @@ model_rows_inserted_cb (ETableModel *etm, int row, int count, gpointer user_data
}
static void
-model_rows_deleted_cb (ETableModel *etm, int row, int count, gpointer user_data)
+model_comps_deleted_cb (ETableModel *etm, gpointer data, gpointer user_data)
{
EDayView *day_view = E_DAY_VIEW (user_data);
- int i;
+ GSList *l, *list = data;
if (!E_CALENDAR_VIEW (day_view)->in_focus) {
return;
@@ -635,15 +635,12 @@ model_rows_deleted_cb (ETableModel *etm, int row, int count, gpointer user_data)
e_day_view_stop_editing_event (day_view);
- for (i = row + count; i > row; i--) {
+ for (l = list; l != NULL; l = g_slist_next (l)) {
+ ECalModelComponent *comp_data = l->data;
gint day, event_num;
const char *uid = NULL;
char *rid = NULL;
- ECalModelComponent *comp_data;
- comp_data = e_cal_model_get_component_at (E_CAL_MODEL (etm), i - 1);
- if (!comp_data)
- continue;
uid = icalcomponent_get_uid (comp_data->icalcomp);
if (e_cal_util_component_is_instance (comp_data->icalcomp)) {
@@ -656,6 +653,7 @@ model_rows_deleted_cb (ETableModel *etm, int row, int count, gpointer user_data)
if (e_day_view_find_event_from_uid (day_view, comp_data->client, uid, rid, &day, &event_num))
e_day_view_remove_event_cb (day_view, day, event_num, NULL);
+
g_free (rid);
}
@@ -1024,8 +1022,8 @@ init_model (EDayView *day_view, ECalModel *model)
G_CALLBACK (model_cell_changed_cb), day_view);
g_signal_connect (G_OBJECT (model), "model_rows_inserted",
G_CALLBACK (model_rows_inserted_cb), day_view);
- g_signal_connect (G_OBJECT (model), "model_rows_deleted",
- G_CALLBACK (model_rows_deleted_cb), day_view);
+ g_signal_connect (G_OBJECT (model), "comps_deleted",
+ G_CALLBACK (model_comps_deleted_cb), day_view);
}
/* Turn off the background of the canvas windows. This reduces flicker