aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-09-24 02:50:17 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-09-24 02:50:17 +0800
commit332bf4c43050bcad778671cc968043ef0a51f83a (patch)
tree3acefe0c3f061ec676e2f8a228ec72473b0a070b
parent665ee889179ef23e67b354449b9d460304b0fc6e (diff)
downloadgsoc2013-evolution-332bf4c43050bcad778671cc968043ef0a51f83a.tar.gz
gsoc2013-evolution-332bf4c43050bcad778671cc968043ef0a51f83a.tar.zst
gsoc2013-evolution-332bf4c43050bcad778671cc968043ef0a51f83a.zip
only set the file as address to the company if no full name exists
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 svn path=/trunk/; revision=27344
-rw-r--r--addressbook/ChangeLog11
-rw-r--r--addressbook/conduit/address-conduit.c12
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;
}