aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-11-19 12:51:20 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-11-19 12:51:20 +0800
commit736f94d96e9a4c5eee7dcb551fce5d7bd4d6c3c4 (patch)
tree61de7ff560cef90a2ea875839a7bdab1a447d07f
parent28aef9afc71eb2d2606171bbc94d72dfa325ed07 (diff)
downloadgsoc2013-evolution-736f94d96e9a4c5eee7dcb551fce5d7bd4d6c3c4.tar
gsoc2013-evolution-736f94d96e9a4c5eee7dcb551fce5d7bd4d6c3c4.tar.gz
gsoc2013-evolution-736f94d96e9a4c5eee7dcb551fce5d7bd4d6c3c4.tar.bz2
gsoc2013-evolution-736f94d96e9a4c5eee7dcb551fce5d7bd4d6c3c4.tar.lz
gsoc2013-evolution-736f94d96e9a4c5eee7dcb551fce5d7bd4d6c3c4.tar.xz
gsoc2013-evolution-736f94d96e9a4c5eee7dcb551fce5d7bd4d6c3c4.tar.zst
gsoc2013-evolution-736f94d96e9a4c5eee7dcb551fce5d7bd4d6c3c4.zip
make sure the timezone value is sane
2003-11-18 JP Rosevear <jpr@ximian.com> * gui/e-cal-model.c (get_dtstart): make sure the timezone value is sane * gui/e-cal-model-calendar.c (get_dtend): ditto svn path=/trunk/; revision=23435
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/e-cal-model-calendar.c10
-rw-r--r--calendar/gui/e-cal-model.c10
3 files changed, 18 insertions, 11 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 4d45314a24..6906c37fac 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,4 +1,11 @@
-2003-11-18 <jpr@ximian.com>
+2003-11-18 JP Rosevear <jpr@ximian.com>
+
+ * gui/e-cal-model.c (get_dtstart): make sure the timezone value is
+ sane
+
+ * gui/e-cal-model-calendar.c (get_dtend): ditto
+
+2003-11-18 JP Rosevear <jpr@ximian.com>
* gui/calendar-config.h: add protos
diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c
index 76462064a2..e41160770a 100644
--- a/calendar/gui/e-cal-model-calendar.c
+++ b/calendar/gui/e-cal-model-calendar.c
@@ -126,11 +126,11 @@ get_dtend (ECalModelComponent *comp_data)
comp_data->dtend = g_new0 (ECellDateEditValue, 1);
comp_data->dtend->tt = tt_end;
- /* FIXME: handle errors */
- e_cal_get_timezone (comp_data->client,
- icaltime_get_tzid (tt_end),
- &zone, NULL);
- comp_data->dtend->zone = zone;
+ if (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;
}
return comp_data->dtend;
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 699a6d43b2..0073a7cac8 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -352,11 +352,11 @@ get_dtstart (ECalModel *model, ECalModelComponent *comp_data)
comp_data->dtstart = g_new0 (ECellDateEditValue, 1);
comp_data->dtstart->tt = tt_start;
- /* FIXME: handle errors */
- e_cal_get_timezone (comp_data->client,
- icaltime_get_tzid (tt_start),
- &zone, NULL);
- comp_data->dtstart->zone = zone;
+ if (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;
}
return comp_data->dtstart;