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 --- addressbook/conduit/address-conduit.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'addressbook/conduit') diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index 4b7d85c0f2..87d95bd55a 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -23,12 +23,6 @@ */ #include -#include -#include -#include -#include -#include -#include #include #include @@ -37,12 +31,12 @@ #include #include #include -#include #include #include #include #include #include +#include #define ADDR_CONFIG_LOAD 1 #define ADDR_CONFIG_DESTROY 1 @@ -55,7 +49,7 @@ GnomePilotConduit * conduit_get_gpilot_conduit (guint32); void conduit_destroy_gpilot_conduit (GnomePilotConduit*); -#define CONDUIT_VERSION "0.1.0" +#define CONDUIT_VERSION "0.1.1" #ifdef G_LOG_DOMAIN #undef G_LOG_DOMAIN #endif @@ -304,22 +298,22 @@ local_record_from_ecard (EAddrLocalRecord *local, ECard *ecard, EAddrConduitCont if (ecard->name) { if (ecard->name->given) - local->addr->entry[entryFirstname] = strdup (ecard->name->given); + local->addr->entry[entryFirstname] = e_pilot_utf8_to_pchar (ecard->name->given); if (ecard->name->family) - local->addr->entry[entryLastname] = strdup (ecard->name->family); + local->addr->entry[entryLastname] = e_pilot_utf8_to_pchar (ecard->name->family); if (ecard->org) - local->addr->entry[entryCompany] = strdup (ecard->org); + local->addr->entry[entryCompany] = e_pilot_utf8_to_pchar (ecard->org); if (ecard->title) - local->addr->entry[entryTitle] = strdup (ecard->title); + local->addr->entry[entryTitle] = e_pilot_utf8_to_pchar (ecard->title); } delivery = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_HOME); if (delivery) { - local->addr->entry[entryAddress] = strdup (delivery->street); - local->addr->entry[entryCity] = strdup (delivery->city); - local->addr->entry[entryState] = strdup (delivery->region); - local->addr->entry[entryZip] = strdup (delivery->code); - local->addr->entry[entryCountry] = strdup (delivery->country); + local->addr->entry[entryAddress] = e_pilot_utf8_to_pchar (delivery->street); + local->addr->entry[entryCity] = e_pilot_utf8_to_pchar (delivery->city); + local->addr->entry[entryState] = e_pilot_utf8_to_pchar (delivery->region); + local->addr->entry[entryZip] = e_pilot_utf8_to_pchar (delivery->code); + local->addr->entry[entryCountry] = e_pilot_utf8_to_pchar (delivery->country); } for (i = 0; i <= 7; i++) { @@ -344,7 +338,7 @@ local_record_from_ecard (EAddrLocalRecord *local, ECard *ecard, EAddrConduitCont phone_str = e_card_simple_get_const (simple, E_CARD_SIMPLE_FIELD_PHONE_MOBILE); if (phone_str) { - local->addr->entry[phone] = strdup (phone_str); + local->addr->entry[phone] = e_pilot_utf8_to_pchar (phone_str); local->addr->phoneLabel[phone - entryPhone1] = i; phone++; } -- cgit