From 256dc9fd290522382a31ab107f0709f26e20d9a2 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 30 Nov 2007 10:40:11 +0000 Subject: ** Fix for bug #325730 2007-11-30 Milan Crha ** Fix for bug #325730 * gui/e-calendar-table.c: (hide_completed_rows): * gui/e-cal-model.c: (e_cal_view_objects_added_cb), (e_cal_view_objects_removed_cb), (remove_client_objects): Reverting part of previous patch (2007-11-23) and added notifications about model_changed after done with deleting. svn path=/trunk/; revision=34617 --- calendar/gui/e-cal-model.c | 15 +++++++++------ calendar/gui/e-calendar-table.c | 3 +++ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 6b1fc97251..344540193e 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -1424,11 +1424,10 @@ e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer user_data pos = get_position_in_array (priv->objects, comp_data); e_table_model_pre_change (E_TABLE_MODEL (model)); + e_table_model_row_deleted (E_TABLE_MODEL (model), pos); if (g_ptr_array_remove (priv->objects, comp_data)) e_cal_model_free_component_data (comp_data); - - e_table_model_row_deleted (E_TABLE_MODEL (model), pos); } e_cal_component_free_id (id); @@ -1490,13 +1489,15 @@ e_cal_view_objects_removed_cb (ECalView *query, GList *ids, gpointer user_data) pos = get_position_in_array (priv->objects, comp_data); e_table_model_pre_change (E_TABLE_MODEL (model)); + e_table_model_row_deleted (E_TABLE_MODEL (model), pos); if (g_ptr_array_remove (priv->objects, comp_data)) e_cal_model_free_component_data (comp_data); - - e_table_model_row_deleted (E_TABLE_MODEL (model), pos); } } + + /* to notify about changes, because in call of row_deleted there are still all events */ + e_table_model_changed (E_TABLE_MODEL (model)); } static void @@ -1669,13 +1670,15 @@ remove_client_objects (ECalModel *model, ECalModelClient *client_data) if (comp_data->client == client_data->client) { e_table_model_pre_change (E_TABLE_MODEL (model)); + e_table_model_row_deleted (E_TABLE_MODEL (model), i - 1); g_ptr_array_remove (model->priv->objects, comp_data); e_cal_model_free_component_data (comp_data); - - e_table_model_row_deleted (E_TABLE_MODEL (model), i - 1); } } + + /* to notify about changes, because in call of row_deleted there are still all events */ + e_table_model_changed (E_TABLE_MODEL (model)); } static void diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 60d4dba6e4..1b24de3b64 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -1476,6 +1476,9 @@ hide_completed_rows (ECalModel *model, GList *clients_list, char *hide_sexp, GPt g_list_foreach (objects, (GFunc) icalcomponent_free, NULL); g_list_free (objects); + + /* to notify about changes, because in call of row_deleted there are still all events */ + e_table_model_changed (E_TABLE_MODEL (model)); } } -- cgit