aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/conduits/todo
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-12-01 07:56:33 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-12-01 07:56:33 +0800
commit4ace38162633ccff9497683e67e2f93f3ab850cf (patch)
tree40e2939bc0c8b96b0ce1c5f587ad4464550e5807 /calendar/conduits/todo
parent8204428e196c36150164a3dcc0bc02ceb851cfd7 (diff)
downloadgsoc2013-evolution-4ace38162633ccff9497683e67e2f93f3ab850cf.tar
gsoc2013-evolution-4ace38162633ccff9497683e67e2f93f3ab850cf.tar.gz
gsoc2013-evolution-4ace38162633ccff9497683e67e2f93f3ab850cf.tar.bz2
gsoc2013-evolution-4ace38162633ccff9497683e67e2f93f3ab850cf.tar.lz
gsoc2013-evolution-4ace38162633ccff9497683e67e2f93f3ab850cf.tar.xz
gsoc2013-evolution-4ace38162633ccff9497683e67e2f93f3ab850cf.tar.zst
gsoc2013-evolution-4ace38162633ccff9497683e67e2f93f3ab850cf.zip
Debug message cleanups (comp_from_remote_record): Properly set the ical
2000-11-30 JP Rosevear <jpr@helixcode.com> * conduits/todo/todo-conduit.c: Debug message cleanups (comp_from_remote_record): Properly set the ical description field * conduits/calendar/calendar-conduit.c (is_empty_time): New utility functions that look for all 0's in a struct tm (comp_from_remote_record): use above (local_record_from_comp): Correctly set the repeatForever value so that we repeat forever instead of a really long time (comp_from_remote_record): Only set the cal component recurrence until field when repeatForever is 0 svn path=/trunk/; revision=6748
Diffstat (limited to 'calendar/conduits/todo')
-rw-r--r--calendar/conduits/todo/todo-conduit.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index df0d6bfb8e..9eb0dfef61 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -53,7 +53,7 @@
GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-#define CONDUIT_VERSION "0.1.1"
+#define CONDUIT_VERSION "0.1.2"
#ifdef G_LOG_DOMAIN
#undef G_LOG_DOMAIN
#endif
@@ -71,7 +71,7 @@ void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
#define WARN(e...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, e)
#define INFO(e...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, e)
-/* debug spew DELETE ME */
+/* Debug routines */
static char *
print_local (EToDoLocalRecord *local)
{
@@ -96,8 +96,6 @@ print_local (EToDoLocalRecord *local)
return "";
}
-
-/* debug spew DELETE ME */
static char *print_remote (GnomePilotRecord *remote)
{
static char buff[ 4096 ];
@@ -396,10 +394,8 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
struct ToDo todo;
struct icaltimetype now = icaltime_from_timet (time (NULL), FALSE, FALSE);
CalComponentText summary = {NULL, NULL};
- CalComponentText description = {NULL, NULL};
CalComponentDateTime dt = {NULL, NULL};
struct icaltimetype due;
- GSList *d_list;
g_return_val_if_fail (remote != NULL, NULL);
@@ -414,19 +410,25 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
comp = cal_component_clone (in_comp);
}
- LOG (" comp_from_remote_record: "
- "creating from remote %s and comp %s\n",
- print_remote (remote), cal_component_get_as_string (comp));
-
cal_component_set_last_modified (comp, &now);
summary.value = todo.description;
cal_component_set_summary (comp, &summary);
- description.value = todo.note;
- d_list = g_slist_append (NULL, &description);
- cal_component_set_comment_list (comp, d_list);
- g_slist_free (d_list);
+ /* The iCal description field */
+ if (!todo.note) {
+ cal_component_set_comment_list (comp, NULL);
+ } else {
+ GSList l;
+ CalComponentText text;
+
+ text.value = todo.note;
+ text.altrep = NULL;
+ l.data = &text;
+ l.next = NULL;
+
+ cal_component_set_description_list (comp, &l);
+ }
if (todo.complete) {
int percent = 100;
@@ -468,9 +470,6 @@ update_comp (GnomePilotConduitSyncAbs *conduit, CalComponent *comp,
g_return_if_fail (conduit != NULL);
g_return_if_fail (comp != NULL);
- LOG ("update_comp: saving to desktop\n%s\n",
- cal_component_get_as_string (comp));
-
success = cal_client_update_object (ctxt->client, comp);
if (!success)