diff options
-rw-r--r-- | calendar/ChangeLog | 10 | ||||
-rw-r--r-- | calendar/gui/e-cal-model-calendar.c | 4 | ||||
-rw-r--r-- | calendar/gui/e-cal-model-tasks.c | 20 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.c | 4 |
4 files changed, 24 insertions, 14 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 9eddd98c12..88ce6d1159 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,13 @@ +2003-11-19 JP Rosevear <jpr@ximian.com> + + * gui/e-cal-model-tasks.c (get_due): make sure timezone value is + sane + (get_completed): ditto + + * gui/e-cal-model.c (get_dtstart): add more guards + + * gui/e-cal-model-calendar.c (get_dtend): ditto + 2003-11-19 Rodrigo Moya <rodrigo@ximian.com> Fixes #51052 diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c index e41160770a..9fd2db7544 100644 --- a/calendar/gui/e-cal-model-calendar.c +++ b/calendar/gui/e-cal-model-calendar.c @@ -126,8 +126,8 @@ get_dtend (ECalModelComponent *comp_data) comp_data->dtend = g_new0 (ECellDateEditValue, 1); comp_data->dtend->tt = tt_end; - if (e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_end), - &zone, NULL)) + if (icaltime_get_tzid (tt_end) + && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_end), &zone, NULL)) comp_data->dtend->zone = zone; else comp_data->dtend->zone = NULL; diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c index da59bd8d09..2251ec7f88 100644 --- a/calendar/gui/e-cal-model-tasks.c +++ b/calendar/gui/e-cal-model-tasks.c @@ -220,11 +220,11 @@ get_completed (ECalModelComponent *comp_data) comp_data->completed = g_new0 (ECellDateEditValue, 1); comp_data->completed->tt = tt_completed; - /* FIXME: handle errors */ - e_cal_get_timezone (comp_data->client, - icaltime_get_tzid (tt_completed), - &zone, NULL); - comp_data->completed->zone = zone; + if (icaltime_get_tzid (tt_completed) + && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_completed), &zone, NULL)) + comp_data->completed->zone = zone; + else + comp_data->completed->zone = NULL; } return comp_data->completed; @@ -250,11 +250,11 @@ get_due (ECalModelComponent *comp_data) comp_data->due = g_new0 (ECellDateEditValue, 1); comp_data->due->tt = tt_due; - /* FIXME: handle errors */ - e_cal_get_timezone (comp_data->client, - icaltime_get_tzid (tt_due), - &zone, NULL); - comp_data->due->zone = zone; + if (icaltime_get_tzid (tt_due) + && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_due), &zone, NULL)) + comp_data->due->zone = zone; + else + comp_data->due->zone = NULL; } return comp_data->due; diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 0073a7cac8..9ac1104380 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -352,8 +352,8 @@ get_dtstart (ECalModel *model, ECalModelComponent *comp_data) comp_data->dtstart = g_new0 (ECellDateEditValue, 1); comp_data->dtstart->tt = tt_start; - if (e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_start), - &zone, NULL)) + if (icaltime_get_tzid (tt_start) + && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_start), &zone, NULL)) comp_data->dtstart->zone = zone; else comp_data->dtstart->zone = NULL; |