[evolution-patches] 59725 Address Book Conduit updates wrong record
- From: JP Rosevear <jpr novell com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] 59725 Address Book Conduit updates wrong record
- Date: Thu, 23 Sep 2004 00:53:53 -0400
Always found the first record in the list. Also fixed a problem when
synching if deleting a record on the desktop and another file as problem
for first/last name records.
-JP
--
JP Rosevear <jpr novell com>
Novell, Inc.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1822.2.4
diff -u -p -r1.1822.2.4 ChangeLog
--- ChangeLog 16 Sep 2004 14:45:53 -0000 1.1822.2.4
+++ ChangeLog 23 Sep 2004 04:54:17 -0000
@@ -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-13 Rodney Dawes <dobey novell com>
* gui/contact-editor/e-contact-editor.c (show_help_cb):
Index: conduit/address-conduit.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/conduit/address-conduit.c,v
retrieving revision 1.86
diff -u -p -r1.86 address-conduit.c
--- conduit/address-conduit.c 2 Aug 2004 18:34:30 -0000 1.86
+++ conduit/address-conduit.c 23 Sep 2004 04:54:17 -0000
@@ -982,7 +982,7 @@ local_record_from_uid (EAddrLocalRecord
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(EAddrConduitCon
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
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
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]