diff options
-rw-r--r-- | addressbook/ChangeLog | 11 | ||||
-rw-r--r-- | addressbook/conduit/address-conduit.c | 12 |
2 files changed, 19 insertions, 4 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 191c5866f0..e5a290c674 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,14 @@ +2004-09-23 JP Rosevear <jpr@novell.com> + + * conduit/address-conduit.c (ecard_from_remote_record): only set + the file as address to the company if no full name exists + (delete_record): don't bail out if the record simply isn't found + + Fixes #59725 + + * conduit/address-conduit.c (local_record_from_uid): remove + extraneous semicolon + 2004-09-21 William Jon McCann <mccann@jhu.edu> * gui/component/component-factory.c (factory): Quiet debug messages. diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index a80b1e2b67..15573c190b 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -982,7 +982,7 @@ local_record_from_uid (EAddrLocalRecord *local, contact = l->data; /* FIXME Do we need to check for the empty string? */ - if ((cuid = e_contact_get_const (contact, E_CONTACT_UID)) && !strcmp (cuid, uid)); + if ((cuid = e_contact_get_const (contact, E_CONTACT_UID)) && !strcmp (cuid, uid)) break; contact = NULL; @@ -1030,11 +1030,13 @@ ecard_from_remote_record(EAddrConduitContext *ctxt, full_name = e_contact_name_to_string (name); e_contact_set (contact, E_CONTACT_FULL_NAME, full_name); e_contact_name_free (name); - g_free (full_name); /* File As */ - set_contact_text (contact, E_CONTACT_FILE_AS, address, entryCompany); + if (!full_name || !*full_name) + set_contact_text (contact, E_CONTACT_FILE_AS, address, entryCompany); + g_free (full_name); + /* Title and Company */ set_contact_text (contact, E_CONTACT_TITLE, address, entryTitle); set_contact_text (contact, E_CONTACT_ORG, address, entryCompany); @@ -1549,6 +1551,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit, EAddrLocalRecord *local, EAddrConduitContext *ctxt) { + GError *error = NULL; int retval = 0; g_return_val_if_fail (local != NULL, -1); @@ -1557,8 +1560,9 @@ delete_record (GnomePilotConduitSyncAbs *conduit, LOG (g_message ( "delete_record: delete %s\n", print_local (local) )); e_pilot_map_remove_by_uid (ctxt->map, e_contact_get_const (local->contact, E_CONTACT_UID)); - if (!e_book_remove_contact (ctxt->ebook, e_contact_get_const (local->contact, E_CONTACT_UID), NULL)) { + if (!e_book_remove_contact (ctxt->ebook, e_contact_get_const (local->contact, E_CONTACT_UID), &error) && error->code != E_BOOK_ERROR_CONTACT_NOT_FOUND) { WARN ("delete_record: failed to delete card in ebook\n"); + g_error_free (error); retval = -1; } |