diff options
author | JP Rosevear <jpr@ximian.com> | 2002-09-24 22:32:58 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-09-24 22:32:58 +0800 |
commit | 46d815d3dcf5f289aadbcae47c9b416fdded09cc (patch) | |
tree | a652f28379575e513adb79ba2f135455c196b8b5 | |
parent | 91875b613e4f475825c4ae9c2532f57443070d58 (diff) | |
download | gsoc2013-evolution-46d815d3dcf5f289aadbcae47c9b416fdded09cc.tar gsoc2013-evolution-46d815d3dcf5f289aadbcae47c9b416fdded09cc.tar.gz gsoc2013-evolution-46d815d3dcf5f289aadbcae47c9b416fdded09cc.tar.bz2 gsoc2013-evolution-46d815d3dcf5f289aadbcae47c9b416fdded09cc.tar.lz gsoc2013-evolution-46d815d3dcf5f289aadbcae47c9b416fdded09cc.tar.xz gsoc2013-evolution-46d815d3dcf5f289aadbcae47c9b416fdded09cc.tar.zst gsoc2013-evolution-46d815d3dcf5f289aadbcae47c9b416fdded09cc.zip |
make sure the start/end for no time palm events are DATE values, tidy code
2002-09-24 JP Rosevear <jpr@ximian.com>
* conduits/calendar/calendar-conduit.c (comp_from_remote_record):
make sure the start/end for no time palm events are DATE values,
tidy code slightly
svn path=/trunk/; revision=18199
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/conduits/calendar/calendar-conduit.c | 31 |
2 files changed, 24 insertions, 13 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 6beff2acdf..e29f3e8086 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,11 @@ 2002-09-24 JP Rosevear <jpr@ximian.com> + * conduits/calendar/calendar-conduit.c (comp_from_remote_record): + make sure the start/end for no time palm events are DATE values, + tidy code slightly + +2002-09-24 JP Rosevear <jpr@ximian.com> + * conduits/calendar/calendar-conduit.c (process_multi_day): convert to date values if the original start and end were both dates diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index d057ed49fe..dac3d7cf55 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -938,7 +938,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, struct icaltimetype now = icaltime_from_timet_with_zone (time (NULL), FALSE, timezone), it; struct icalrecurrencetype recur; CalComponentText summary = {NULL, NULL}; - CalComponentDateTime dt = {NULL, icaltimezone_get_tzid (timezone)}; + CalComponentDateTime dt = {NULL, NULL}; GSList *edl = NULL; char *txt; int pos, i; @@ -978,21 +978,26 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, free (txt); } - if (!is_empty_time (appt.begin)) { - it = tm_to_icaltimetype (&appt.begin, FALSE); + if (appt.event && !is_empty_time (appt.begin)) { + it = tm_to_icaltimetype (&appt.begin, TRUE); dt.value = ⁢ + dt.tzid = NULL; cal_component_set_dtstart (comp, &dt); - } - - if (appt.event) { - it = tm_to_icaltimetype (&appt.begin, FALSE); - icaltime_adjust (&it, 1, 0, 0, 0); - dt.value = ⁢ - cal_component_set_dtend (comp, &dt); - } else if (!is_empty_time (appt.end)) { - it = tm_to_icaltimetype (&appt.end, FALSE); - dt.value = ⁢ cal_component_set_dtend (comp, &dt); + } else { + dt.tzid = icaltimezone_get_tzid (timezone); + + if (!is_empty_time (appt.begin)) { + it = tm_to_icaltimetype (&appt.begin, FALSE); + dt.value = ⁢ + cal_component_set_dtstart (comp, &dt); + } + + if (!is_empty_time (appt.end)) { + it = tm_to_icaltimetype (&appt.end, FALSE); + dt.value = ⁢ + cal_component_set_dtend (comp, &dt); + } } /* Recurrence information */ |