diff options
author | JP Rosevear <jpr@ximian.com> | 2001-04-12 05:25:23 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-04-12 05:25:23 +0800 |
commit | e6ef1f1539d4542e2d66ebdef424ad1eb0fca698 (patch) | |
tree | 80faf26fbb95fa871d3e5c703964a86f83baa94a /addressbook/conduit/address-conduit.c | |
parent | 7c72692382246362d27069a385fdd568fe4fd666 (diff) | |
download | gsoc2013-evolution-e6ef1f1539d4542e2d66ebdef424ad1eb0fca698.tar.gz gsoc2013-evolution-e6ef1f1539d4542e2d66ebdef424ad1eb0fca698.tar.zst gsoc2013-evolution-e6ef1f1539d4542e2d66ebdef424ad1eb0fca698.zip |
Don't add more than five phone numbers and set the remaining blank entries
2001-04-11 JP Rosevear <jpr@ximian.com>
* conduit/address-conduit.c (local_record_from_ecard): Don't add
more than five phone numbers and set the remaining blank entries
to some reasonable defaults
svn path=/trunk/; revision=9249
Diffstat (limited to 'addressbook/conduit/address-conduit.c')
-rw-r--r-- | addressbook/conduit/address-conduit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index 5f6fdab5bb..78db75c99d 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -372,7 +372,7 @@ local_record_from_ecard (EAddrLocalRecord *local, ECard *ecard, EAddrConduitCont local->addr->entry[entryCountry] = e_pilot_utf8_to_pchar (delivery->country); } - for (i = 0; i <= 7; i++) { + for (i = 0; i <= 7 && phone <= entryPhone5; i++) { const char *phone_str = NULL; char *phonelabel = ctxt->ai.phoneLabels[i]; @@ -397,9 +397,10 @@ local_record_from_ecard (EAddrLocalRecord *local, ECard *ecard, EAddrConduitCont local->addr->entry[phone] = e_pilot_utf8_to_pchar (phone_str); local->addr->phoneLabel[phone - entryPhone1] = i; phone++; - } - + } } + for (; phone <= entryPhone5; phone++) + local->addr->phoneLabel[phone - entryPhone1] = phone - entryPhone1; gtk_object_unref (GTK_OBJECT (simple)); } |