aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author7 <jpr@helixcode.com>2000-10-27 23:58:37 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-10-27 23:58:37 +0800
commit349a30e209bd674ab60ae8e6a0d0fd05ca8c5d57 (patch)
treed922dd6614271202d9b9c48111a2a2f49c048b78
parentd47425dac39e16390bc9c5908efc300b011a88ea (diff)
downloadgsoc2013-evolution-349a30e209bd674ab60ae8e6a0d0fd05ca8c5d57.tar
gsoc2013-evolution-349a30e209bd674ab60ae8e6a0d0fd05ca8c5d57.tar.gz
gsoc2013-evolution-349a30e209bd674ab60ae8e6a0d0fd05ca8c5d57.tar.bz2
gsoc2013-evolution-349a30e209bd674ab60ae8e6a0d0fd05ca8c5d57.tar.lz
gsoc2013-evolution-349a30e209bd674ab60ae8e6a0d0fd05ca8c5d57.tar.xz
gsoc2013-evolution-349a30e209bd674ab60ae8e6a0d0fd05ca8c5d57.tar.zst
gsoc2013-evolution-349a30e209bd674ab60ae8e6a0d0fd05ca8c5d57.zip
Remove invalid test. (local_record_from_comp): If the event is all day,
2000-10-27 <jpr@helixcode.com> * conduits/calendar/calendar-conduit.c (add_archive_record): Remove invalid test. (local_record_from_comp): If the event is all day, mark it as timeless (comp_from_remote_record): Timeless events take up all day * conduits/todo/todo-conduit.c (add_archive_record): ditto svn path=/trunk/; revision=6230
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c14
-rw-r--r--calendar/conduits/todo/todo-conduit.c3
3 files changed, 20 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index dd91c49fc1..33792350bf 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2000-10-27 <jpr@helixcode.com>
+
+ * conduits/calendar/calendar-conduit.c (add_archive_record): Remove
+ invalid test.
+ (local_record_from_comp): If the event is all day, mark it as timeless
+ (comp_from_remote_record): Timeless events take up all day
+
+ * conduits/todo/todo-conduit.c (add_archive_record): ditto
+
2000-10-27 JP Rosevear <jpr@helixcode.com>
* conduits/todo/todo-conduit.c (add_archive_record): Take proper
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index d25bdf32d1..df756728db 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -331,7 +331,7 @@ local_record_from_comp (ECalLocalRecord *local, CalComponent *comp, ECalConduitC
}
cal_component_get_dtend (comp, &dt);
- if (dt.value) {
+ if (dt.value && time_add_day (dt_time, 1) != icaltime_as_timet (*dt.value)) {
dt_time = icaltime_as_timet (*dt.value);
local->appt->end = *localtime (&dt_time);
@@ -465,7 +465,14 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
cal_component_set_dtstart (comp, &dt);
}
- if (appt.end.tm_sec || appt.end.tm_min || appt.end.tm_hour
+ if (appt.event) {
+ time_t t = mktime (&appt.begin);
+
+ t = time_day_end (t);
+ it = icaltime_from_timet (t, FALSE, FALSE);
+ dt.value = &it;
+ cal_component_set_dtend (comp, &dt);
+ } else if (appt.end.tm_sec || appt.end.tm_min || appt.end.tm_hour
|| appt.end.tm_mday || appt.end.tm_mon || appt.end.tm_year) {
it = icaltime_from_timet (mktime (&appt.end), FALSE, FALSE);
dt.value = &it;
@@ -880,10 +887,9 @@ add_archive_record (GnomePilotConduitSyncAbs *conduit,
int retval = 0;
g_return_val_if_fail (remote != NULL, -1);
- g_return_val_if_fail (local != NULL, -1);
LOG ("add_archive_record: doing nothing with %s\n",
- print_local (local));
+ print_remote (remote));
return retval;
}
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index 0d08002b86..beca13159d 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -761,10 +761,9 @@ add_archive_record (GnomePilotConduitSyncAbs *conduit,
int retval = 0;
g_return_val_if_fail (remote != NULL, -1);
- g_return_val_if_fail (local != NULL, -1);
LOG ("add_archive_record: doing nothing with %s\n",
- print_local (local));
+ print_remote (remote));
return retval;
}