From 781b9204d274e1fa64c256e71147392e83cd2f08 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 26 Sep 2001 17:31:33 +0000 Subject: set the last_use and use_score fields of the card to known values so the 2001-09-26 JP Rosevear * backend/pas/pas-backend-file.c (pas_backend_file_changes): set the last_use and use_score fields of the card to known values so the card doesn't register as changed when only they have changed 2001-09-26 Peter Williams * conduit/address-conduit.c (ecard_from_remote_record): Fix this function to set email addresses properly, and handle multiple occurrences of email addresses, home phone numbers, and business phone numbers. svn path=/trunk/; revision=13153 --- addressbook/backend/pas/pas-backend-file.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'addressbook/backend/pas/pas-backend-file.c') diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c index 4d222841b5..990d53e704 100644 --- a/addressbook/backend/pas/pas-backend-file.c +++ b/addressbook/backend/pas/pas-backend-file.c @@ -391,9 +391,19 @@ pas_backend_file_changes (PASBackendFile *bf, /* don't include the version in the list of cards */ if (id_dbt.size != strlen(PAS_BACKEND_FILE_VERSION_NAME) + 1 || strcmp (id_dbt.data, PAS_BACKEND_FILE_VERSION_NAME)) { + ECard *card; char *id = id_dbt.data; - char *vcard_string = vcard_dbt.data; - + char *vcard_string; + + /* Remove fields the user can't change + * and can change without the rest of the + * card changing + */ + card = e_card_new (vcard_dbt.data); + gtk_object_set (GTK_OBJECT (card), "last_use", NULL, "use_score", 0.0, NULL); + vcard_string = e_card_get_vcard_assume_utf8 (card); + gtk_object_unref (GTK_OBJECT (card)); + /* check what type of change has occurred, if any */ switch (e_dbhash_compare (ehash, id, vcard_string)) { case E_DBHASH_STATUS_SAME: -- cgit v1.2.3