aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/conduit/address-conduit.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-12-20 07:09:31 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-12-20 07:09:31 +0800
commitfff1110610062f03b1cc7ffee1c3e076cfe61bdd (patch)
treeaa80a27955ff482b7c2924a766c0b9512b8b55da /addressbook/conduit/address-conduit.c
parent739f0eda9d6a00377350fc343a640e999d8e9255 (diff)
downloadgsoc2013-evolution-fff1110610062f03b1cc7ffee1c3e076cfe61bdd.tar
gsoc2013-evolution-fff1110610062f03b1cc7ffee1c3e076cfe61bdd.tar.gz
gsoc2013-evolution-fff1110610062f03b1cc7ffee1c3e076cfe61bdd.tar.bz2
gsoc2013-evolution-fff1110610062f03b1cc7ffee1c3e076cfe61bdd.tar.lz
gsoc2013-evolution-fff1110610062f03b1cc7ffee1c3e076cfe61bdd.tar.xz
gsoc2013-evolution-fff1110610062f03b1cc7ffee1c3e076cfe61bdd.tar.zst
gsoc2013-evolution-fff1110610062f03b1cc7ffee1c3e076cfe61bdd.zip
Convert cal component strings to pilot character set
2000-12-19 JP Rosevear <jpr@helixcode.com> * 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 <jpr@helixcode.com> * conduit/address-conduit.c (local_record_from_ecard): Convert ecard strings to pilot encodings 2000-12-19 JP Rosevear <jpr@helixcode.com> * 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
Diffstat (limited to 'addressbook/conduit/address-conduit.c')
-rw-r--r--addressbook/conduit/address-conduit.c30
1 files changed, 12 insertions, 18 deletions
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 <config.h>
-#include <sys/stat.h>
-#include <utime.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <signal.h>
-#include <errno.h>
#include <liboaf/liboaf.h>
#include <bonobo.h>
@@ -37,12 +31,12 @@
#include <pi-socket.h>
#include <pi-file.h>
#include <pi-dlp.h>
-#include <pi-version.h>
#include <ebook/e-book.h>
#include <ebook/e-card-types.h>
#include <ebook/e-card-cursor.h>
#include <ebook/e-card.h>
#include <ebook/e-card-simple.h>
+#include <e-pilot-util.h>
#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++;
}