diff options
author | Rodrigo Moya <rodrigo@novell.com> | 2004-12-23 20:35:40 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-12-23 20:35:40 +0800 |
commit | cd13211f3b7c8ec200313d25ded3b7aa972e4b95 (patch) | |
tree | 97b16792ad511ef90766beb5fdeaaa4fd71fc0ca /calendar/gui/e-cal-model.c | |
parent | 6248ae5265b066c363063ea788564165c5c79f30 (diff) | |
download | gsoc2013-evolution-cd13211f3b7c8ec200313d25ded3b7aa972e4b95.tar.gz gsoc2013-evolution-cd13211f3b7c8ec200313d25ded3b7aa972e4b95.tar.zst gsoc2013-evolution-cd13211f3b7c8ec200313d25ded3b7aa972e4b95.zip |
get instance times using the correct timezone. (redo_queries): emit
2004-12-23 Rodrigo Moya <rodrigo@novell.com>
* gui/e-cal-model.c (set_instance_times): get instance times using
the correct timezone.
(redo_queries): emit signals before clearing the array.
* gui/e-day-view.c (process_component):
* gui/e-week-view.c (process_component): no need to try to update,
always add.
svn path=/trunk/; revision=28192
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r-- | calendar/gui/e-cal-model.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 5fba603847..edc0c046a3 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -186,7 +186,6 @@ clear_objects_array (ECalModelPrivate *priv) e_cal_model_free_component_data (comp_data); } - g_ptr_array_set_size (priv->objects, 0); } @@ -1304,21 +1303,21 @@ set_instance_times (ECalModelComponent *comp_data, icaltimezone *zone) if (zone) { if (e_cal_util_component_is_instance (comp_data->icalcomp)) { - comp_data->instance_start = icaltime_as_timet (recur_time); + comp_data->instance_start = icaltime_as_timet_with_zone (recur_time, zone); comp_data->instance_end = comp_data->instance_start + - (icaltime_as_timet (end_time) - - icaltime_as_timet (start_time)); + (icaltime_as_timet_with_zone (end_time, end_time.zone ? end_time.zone : zone) - + icaltime_as_timet_with_zone (start_time, start_time.zone ? start_time.zone : zone)); } else { if (start_time.zone) { - icaltimezone_convert_time (&start_time, start_time.zone, zone); - comp_data->instance_start = icaltime_as_timet (start_time); + //icaltimezone_convert_time (&start_time, start_time.zone, zone); + comp_data->instance_start = icaltime_as_timet_with_zone (start_time, start_time.zone); } else comp_data->instance_start = icaltime_as_timet_with_zone (start_time, zone); if (end_time.zone) { - icaltimezone_convert_time (&end_time, end_time.zone, zone); - comp_data->instance_end = icaltime_as_timet (end_time); + //icaltimezone_convert_time (&end_time, end_time.zone, zone); + comp_data->instance_end = icaltime_as_timet_with_zone (end_time, end_time.zone); } else comp_data->instance_end = icaltime_as_timet_with_zone (end_time, zone); } @@ -1697,8 +1696,8 @@ redo_queries (ECalModel *model) /* clean up the current contents */ e_table_model_pre_change (E_TABLE_MODEL (model)); len = priv->objects->len; - clear_objects_array (priv); e_table_model_rows_deleted (E_TABLE_MODEL (model), 0, len); + clear_objects_array (priv); /* update the query for all clients */ for (l = priv->clients; l != NULL; l = l->next) { |