aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-23 17:56:15 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-23 17:56:15 +0800
commitced5862cb604ccaad1ff82090b972b875e36724b (patch)
treee427a067eb54fa3319918051c2236a29403ced44 /calendar/gui/e-cal-model.c
parent36917891fe11507d70971a54f0378cf84b8c2a59 (diff)
downloadgsoc2013-evolution-ced5862cb604ccaad1ff82090b972b875e36724b.tar
gsoc2013-evolution-ced5862cb604ccaad1ff82090b972b875e36724b.tar.gz
gsoc2013-evolution-ced5862cb604ccaad1ff82090b972b875e36724b.tar.bz2
gsoc2013-evolution-ced5862cb604ccaad1ff82090b972b875e36724b.tar.lz
gsoc2013-evolution-ced5862cb604ccaad1ff82090b972b875e36724b.tar.xz
gsoc2013-evolution-ced5862cb604ccaad1ff82090b972b875e36724b.tar.zst
gsoc2013-evolution-ced5862cb604ccaad1ff82090b972b875e36724b.zip
** Fix for bug #325730
2007-11-23 Milan Crha <mcrha@redhat.com> ** Fix for bug #325730 * gui/e-memos.c: (table_selection_change_cb): * gui/e-tasks.c: (table_selection_change_cb): Clear task/memo preview when have more or less than one row selected. * gui/e-cal-model.c: (e_cal_view_objects_added_cb), (e_cal_view_objects_removed_cb), (remove_client_objects): First delete, then notify, so we read from updated store. svn path=/trunk/; revision=34577
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r--calendar/gui/e-cal-model.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index ec387e43eb..6b1fc97251 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -1424,10 +1424,11 @@ 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);
@@ -1484,15 +1485,16 @@ e_cal_view_objects_removed_cb (ECalView *query, GList *ids, gpointer user_data)
ECalComponentId *id = l->data;
int pos;
- e_table_model_pre_change (E_TABLE_MODEL (model));
-
/* make sure we remove all objects with this UID */
while ((comp_data = search_by_id_and_client (priv, e_cal_view_get_client (query), id))) {
pos = get_position_in_array (priv->objects, comp_data);
- e_table_model_row_deleted (E_TABLE_MODEL (model), pos);
+
+ e_table_model_pre_change (E_TABLE_MODEL (model));
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);
}
}
}
@@ -1667,10 +1669,11 @@ 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);
}
}
}