[evolution-patches] Fix for the bug 274188 [calendar]
- From: pchenthill <pchenthill novell com>
- To: patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] Fix for the bug 274188 [calendar]
- Date: Mon, 09 May 2005 16:26:50 +0530
Hi,
Have attached the patch.
thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2726
diff -u -p -r1.2726 ChangeLog
--- ChangeLog 9 May 2005 09:13:11 -0000 1.2726
+++ ChangeLog 9 May 2005 10:43:08 -0000
@@ -1,3 +1,17 @@
+2005-05-09 Chenthill Palanisamy <pchenthill novell com>
+
+ Fixes #274188
+ * gui/e-cal-model.c (get_dtstart): If its an all day
+ event use the default timezone.
+ (set_instance_times): Use the zone in
+ icaltime_as_timet_with_zone.
+ (e_cal_view_objects_added_cb): Check if the appointment
+ is a recurring appointment before calling generate_instances.
+ * gui/e-calendar-view.c:
+ (e_calendar_view_delete_selected_occurrence): Convert the
+ dtstart with default zone for the all-day events so
+ that we delete the proper instance.
+
2005-05-09 Philip Van Hoof <pvanhoof gnome org>
* gui/alarm-notify/*: Made the alarm-notify dialog
Index: gui/e-cal-model.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-model.c,v
retrieving revision 1.58
diff -u -p -r1.58 e-cal-model.c
--- gui/e-cal-model.c 6 May 2005 04:26:38 -0000 1.58
+++ gui/e-cal-model.c 9 May 2005 10:43:08 -0000
@@ -368,10 +368,16 @@ get_dtstart (ECalModel *model, ECalModel
if (e_cal_model_get_flags (model) & E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES) {
if (got_zone) {
tt_start = icaltime_from_timet_with_zone (comp_data->instance_start, tt_start.is_date, zone);
+ tt_start.is_date = 0;
if (priv->zone)
icaltimezone_convert_time (&tt_start, zone, priv->zone);
- } else
- tt_start = icaltime_from_timet (comp_data->instance_start, tt_start.is_date);
+ } else {
+ /* If the tzid is absent and the dtstart is simply a date, it must be an all day event */
+ if (!tt_start.tzid && tt.is_date)
+ tt_start = icaltime_from_timet_with_zone (comp_data->instance_start, 0, priv->zone);
+ else
+ tt_start = icaltime_from_timet (comp_data->instance_start, tt_start.is_date);
+ }
}
if (!icaltime_is_valid_time (tt_start) || icaltime_is_null_time (tt_start))
@@ -1301,10 +1307,10 @@ set_instance_times (ECalModelComponent *
start_time = icalcomponent_get_dtstart (comp_data->icalcomp);
end_time = icalcomponent_get_dtend (comp_data->icalcomp);
- comp_data->instance_start = icaltime_as_timet (start_time);
+ comp_data->instance_start = icaltime_as_timet_with_zone (start_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, zone) - icaltime_as_timet_with_zone (start_time, zone));
}
static void
@@ -1331,7 +1337,7 @@ e_cal_view_objects_added_cb (ECalView *q
e_cal_model_free_component_data (comp_data);
}
- if ((priv->flags & E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES)) {
+ if (e_cal_util_component_has_recurrences (l->data) && (priv->flags & E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES)) {
RecurrenceExpansionData rdata;
rdata.client = e_cal_view_get_client (query);
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.80
diff -u -p -r1.80 e-calendar-view.c
--- gui/e-calendar-view.c 6 May 2005 03:29:55 -0000 1.80
+++ gui/e-calendar-view.c 9 May 2005 10:43:08 -0000
@@ -923,12 +923,17 @@ e_calendar_view_delete_selected_occurren
e_cal_component_get_uid (comp, &uid);
e_cal_component_get_dtstart (comp, &dt);
- e_cal_get_timezone (event->comp_data->client, dt.tzid, &zone, NULL);
+
+ if (!dt.tzid && dt.value->is_date)
+ zone = e_calendar_view_get_timezone (cal_view);
+ else
+ e_cal_get_timezone (event->comp_data->client, dt.tzid, &zone, NULL);
if (zone)
itt = icaltime_from_timet_with_zone (event->comp_data->instance_start, TRUE, zone);
else
itt = icaltime_from_timet (event->comp_data->instance_start, TRUE);
+
rid = icaltime_as_ical_string (itt);
e_cal_component_free_datetime (&dt);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]