From fff1110610062f03b1cc7ffee1c3e076cfe61bdd Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 19 Dec 2000 23:09:31 +0000 Subject: Convert cal component strings to pilot character set 2000-12-19 JP Rosevear * conduits/calendar/calendar-conduit.c (local_record_from_comp): Convert cal component strings to pilot character set (comp_from_remote_record): vice versa * conduits/todo/todo-conduit.c: Same as above 2000-12-19 JP Rosevear * conduit/address-conduit.c (local_record_from_ecard): Convert ecard strings to pilot encodings 2000-12-19 JP Rosevear * e-pilot-util.c (e_pilot_utf8_to_pchar): Convert utf8 strings to pilot character set (e_pilot_utf8_from_pchar): vice versa * Makefile.am: Conditionally build e-pilot-util.[hc] because they depend on pilot-link stuff svn path=/trunk/; revision=7090 --- calendar/conduits/todo/todo-conduit.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'calendar/conduits/todo') diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 2ef5bc0b76..09676cee73 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -23,16 +23,9 @@ */ #include -#include -#include -#include -#include -#include -#include #include #include -#include #include #include #include @@ -40,8 +33,8 @@ #include #include #include -#include #include +#include #define TODO_CONFIG_LOAD 1 #define TODO_CONFIG_DESTROY 1 @@ -54,7 +47,7 @@ GnomePilotConduit * conduit_get_gpilot_conduit (guint32); void conduit_destroy_gpilot_conduit (GnomePilotConduit*); -#define CONDUIT_VERSION "0.1.2" +#define CONDUIT_VERSION "0.1.3" #ifdef G_LOG_DOMAIN #undef G_LOG_DOMAIN #endif @@ -318,13 +311,13 @@ local_record_from_comp (EToDoLocalRecord *local, CalComponent *comp, EToDoCondui uses free to deallocate */ cal_component_get_summary (comp, &summary); if (summary.value) - local->todo->description = strdup ((char *) summary.value); + local->todo->description = e_pilot_utf8_to_pchar (summary.value); cal_component_get_description_list (comp, &d_list); if (d_list) { description = (CalComponentText *) d_list->data; if (description && description->value) - local->todo->note = strdup (description->value); + local->todo->note = e_pilot_utf8_to_pchar (description->value); else local->todo->note = NULL; } else { @@ -415,9 +408,10 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, cal_component_set_last_modified (comp, &now); - summary.value = todo.description; + summary.value = e_pilot_utf8_from_pchar (todo.description); cal_component_set_summary (comp, &summary); - + free (summary.value); + /* The iCal description field */ if (!todo.note) { cal_component_set_comment_list (comp, NULL); @@ -425,12 +419,13 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, GSList l; CalComponentText text; - text.value = todo.note; + text.value = e_pilot_utf8_from_pchar (todo.note); text.altrep = NULL; l.data = &text; l.next = NULL; cal_component_set_description_list (comp, &l); + free (text.value); } if (todo.complete) { -- cgit v1.2.3