diff options
author | JP Rosevear <jpr@ximian.com> | 2001-04-13 02:44:41 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-04-13 02:44:41 +0800 |
commit | 0f6c6bbb8cb76ba673a10b11407100d02919be04 (patch) | |
tree | b8da73b04d48e717a78cb7987739fc7e3f8027bd /addressbook/conduit | |
parent | d7cd78ec3ba3a7fb8331dde5ea8118cb328726a9 (diff) | |
download | gsoc2013-evolution-0f6c6bbb8cb76ba673a10b11407100d02919be04.tar gsoc2013-evolution-0f6c6bbb8cb76ba673a10b11407100d02919be04.tar.gz gsoc2013-evolution-0f6c6bbb8cb76ba673a10b11407100d02919be04.tar.bz2 gsoc2013-evolution-0f6c6bbb8cb76ba673a10b11407100d02919be04.tar.lz gsoc2013-evolution-0f6c6bbb8cb76ba673a10b11407100d02919be04.tar.xz gsoc2013-evolution-0f6c6bbb8cb76ba673a10b11407100d02919be04.tar.zst gsoc2013-evolution-0f6c6bbb8cb76ba673a10b11407100d02919be04.zip |
put the business address into the pilot record as that is what we put into
2001-04-12 JP Rosevear <jpr@ximian.com>
* conduit/address-conduit.c (local_record_from_ecard): put the
business address into the pilot record as that is what we put into
the desktop record
(ecard_from_remote_record): set both the address label and
delivery address to avoid bad parser guessing, fixes #2143
* backend/ebook/e-card-types.h: remove deprecated pilot code
* backend/ebook/e-card.c: ditto
* backend/ebook/e-card.h: ditto
svn path=/trunk/; revision=9279
Diffstat (limited to 'addressbook/conduit')
-rw-r--r-- | addressbook/conduit/address-conduit.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index 78db75c99d..428584b9c4 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -363,7 +363,7 @@ local_record_from_ecard (EAddrLocalRecord *local, ECard *ecard, EAddrConduitCont 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); + delivery = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS); if (delivery) { local->addr->entry[entryAddress] = e_pilot_utf8_to_pchar (delivery->street); local->addr->entry[entryCity] = e_pilot_utf8_to_pchar (delivery->city); @@ -434,6 +434,7 @@ ecard_from_remote_record(EAddrConduitContext *ctxt, ECard *ecard; ECardSimple *simple; ECardDeliveryAddress delivery; + ECardAddrLabel label; char *string; char *stringparts[3]; int i; @@ -474,7 +475,7 @@ ecard_from_remote_record(EAddrConduitContext *ctxt, /* Address */ memset (&delivery, 0, sizeof (ECardDeliveryAddress)); - delivery.flags = E_CARD_ADDR_HOME; + delivery.flags = E_CARD_ADDR_WORK; if (address.entry[entryAddress]) delivery.street = get_entry_text (address, entryAddress); if (address.entry[entryCity]) @@ -486,16 +487,19 @@ ecard_from_remote_record(EAddrConduitContext *ctxt, if (address.entry[entryZip]) delivery.code = get_entry_text (address, entryZip); - string = e_card_delivery_address_to_string (&delivery); - e_card_simple_set (simple, E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, string); - g_free (string); + label.flags = E_CARD_ADDR_WORK; + label.data = e_card_delivery_address_to_string (&delivery); + + e_card_simple_set_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, &label); + e_card_simple_set_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, &delivery); free (delivery.street); free (delivery.city); free (delivery.region); free (delivery.country); free (delivery.code); - + g_free (label.data); + /* Phone numbers */ for (i = entryPhone1; i <= entryPhone5; i++) { char *phonelabel = ctxt->ai.phoneLabels[address.phoneLabel[i - entryPhone1]]; @@ -517,8 +521,6 @@ ecard_from_remote_record(EAddrConduitContext *ctxt, e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_PHONE_PAGER, phonenum); else if (!strcmp (phonelabel, "Mobile")) e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_PHONE_MOBILE, phonenum); - - g_print (" ['%s' : '%s']\n", phonelabel, phonenum); g_free (phonenum); } |