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
This commit is contained in:
JP Rosevear
2001-04-11 21:25:23 +00:00
committed by JP Rosevear
parent 7c72692382
commit e6ef1f1539
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,9 @@
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
2001-04-11 Christopher James Lahey <clahey@ximian.com>
* backend/ebook/e-card-simple.h: Added

View File

@ -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));
}