From 6dc2652f706f148223bf921d77929bf7b607321c Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 20 Dec 2000 00:41:48 +0000 Subject: Remove pointless comment 2000-12-19 JP Rosevear * conduits/calendar/calendar-conduit.c: Remove pointless comment * conduits/todo/todo-conduit.c (is_empty_time): add utility function (comp_from_remote_record): use it 2000-12-19 JP Rosevear *conduit/address-conduit.c (ecard_from_remote_record): Convert pilot strings to utf for the e-cards. svn path=/trunk/; revision=7093 --- calendar/ChangeLog | 7 +++++++ calendar/conduits/calendar/calendar-conduit.c | 1 - calendar/conduits/todo/todo-conduit.c | 16 +++++++++++----- 3 files changed, 18 insertions(+), 6 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 3dd356e39d..fdba46e897 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2000-12-19 JP Rosevear + + * conduits/calendar/calendar-conduit.c: Remove pointless comment + + * conduits/todo/todo-conduit.c (is_empty_time): add utility function + (comp_from_remote_record): use it + 2000-12-19 JP Rosevear * conduits/calendar/calendar-conduit.c (local_record_from_comp): diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 45f4aa0a08..009b508399 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -248,7 +248,6 @@ get_pilot_day (icalrecurrencetype_weekday wd) } } -/* FIX ME Is there a better way to see if no start time set? */ static gboolean is_empty_time (struct tm time) { diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 09676cee73..7db0f39861 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -206,6 +206,16 @@ map_name (EToDoConduitContext *ctxt) return filename; } +static gboolean +is_empty_time (struct tm time) +{ + if (time.tm_sec || time.tm_min || time.tm_hour + || time.tm_mday || time.tm_mon || time.tm_year) + return FALSE; + + return TRUE; +} + static GList * next_changed_item (EToDoConduitContext *ctxt, GList *changes) { @@ -434,11 +444,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, cal_component_set_percent (comp, &percent); } - /* FIX ME This is a bit hackish, how else can we tell if there is - * no due date set? - */ - if (todo.due.tm_sec || todo.due.tm_min || todo.due.tm_hour - || todo.due.tm_mday || todo.due.tm_mon || todo.due.tm_year) { + if (is_empty_time (todo.due)) { due = icaltime_from_timet (mktime (&todo.due), FALSE, TRUE); dt.value = &due; cal_component_set_due (comp, &dt); -- cgit v1.2.3