aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-table.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-10-11 17:07:24 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-10-11 17:07:24 +0800
commit25317085c402d37406b4ecbd4a13289a09c9385e (patch)
tree5a81db73505858bee8d1bc1656bec2238dd71851 /calendar/gui/e-calendar-table.c
parent08e459d65f1d1895bf6d6d8dad15bec33b733550 (diff)
downloadgsoc2013-evolution-25317085c402d37406b4ecbd4a13289a09c9385e.tar
gsoc2013-evolution-25317085c402d37406b4ecbd4a13289a09c9385e.tar.gz
gsoc2013-evolution-25317085c402d37406b4ecbd4a13289a09c9385e.tar.bz2
gsoc2013-evolution-25317085c402d37406b4ecbd4a13289a09c9385e.tar.lz
gsoc2013-evolution-25317085c402d37406b4ecbd4a13289a09c9385e.tar.xz
gsoc2013-evolution-25317085c402d37406b4ecbd4a13289a09c9385e.tar.zst
gsoc2013-evolution-25317085c402d37406b4ecbd4a13289a09c9385e.zip
fixes #266144, #317575.
svn path=/trunk/; revision=30503
Diffstat (limited to 'calendar/gui/e-calendar-table.c')
-rw-r--r--calendar/gui/e-calendar-table.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index d339ccaf8b..943a84f533 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -1296,14 +1296,21 @@ hide_completed_rows (ECalModel *model, GList *clients_list, char *hide_sexp, GPt
for (m = objects; m; m = m->next) {
ECalModelComponent *comp_data;
+ ECalComponentId *id;
+ ECalComponent *comp = e_cal_component_new ();
- if ((comp_data = e_cal_model_get_component_for_uid (model, icalcomponent_get_uid (m->data)))) {
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (m->data));
+ id = e_cal_component_get_id (comp);
+
+ if ((comp_data = e_cal_model_get_component_for_uid (model, id))) {
e_table_model_pre_change (E_TABLE_MODEL (model));
pos = get_position_in_array (comp_objects, comp_data);
e_table_model_row_deleted (E_TABLE_MODEL (model), pos);
g_ptr_array_remove (comp_objects, comp_data);
}
+ e_cal_component_free_id (id);
+ g_object_unref (comp);
}
g_list_foreach (objects, (GFunc) icalcomponent_free, NULL);
@@ -1328,8 +1335,13 @@ show_completed_rows (ECalModel *model, GList *clients_list, char *show_sexp, GPt
for (m = objects; m; m = m->next) {
ECalModelComponent *comp_data;
+ ECalComponentId *id;
+ ECalComponent *comp = e_cal_component_new ();
+
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (m->data));
+ id = e_cal_component_get_id (comp);
- if (!(e_cal_model_get_component_for_uid (model, icalcomponent_get_uid (m->data)))) {
+ if (!(e_cal_model_get_component_for_uid (model, id))) {
e_table_model_pre_change (E_TABLE_MODEL (model));
comp_data = g_new0 (ECalModelComponent, 1);
comp_data->client = client;
@@ -1342,6 +1354,8 @@ show_completed_rows (ECalModel *model, GList *clients_list, char *show_sexp, GPt
g_ptr_array_add (comp_objects, comp_data);
e_table_model_row_inserted (E_TABLE_MODEL (model), comp_objects->len - 1);
}
+ e_cal_component_free_id (id);
+ g_object_unref (comp);
}
}
}