From 5944eda9faeea50696b6d7da5ac04a952752ad58 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Sat, 27 Oct 2001 15:35:37 +0000 Subject: touch the record on lookup (check_for_slow_setting): write touched only if 2001-10-27 JP Rosevear * conduit/address-conduit.c (local_record_from_ecard): touch the record on lookup (check_for_slow_setting): write touched only if we are doing a slow sync (card_removed): don't touch on lookup (match): touch on lookup svn path=/trunk/; revision=14209 --- addressbook/ChangeLog | 9 +++++++++ addressbook/conduit/address-conduit.c | 12 +++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index b20e9f2974..b8d4eef9c7 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,12 @@ +2001-10-27 JP Rosevear + + * conduit/address-conduit.c (local_record_from_ecard): touch the + record on lookup + (check_for_slow_setting): write touched only if we are doing a + slow sync + (card_removed): don't touch on lookup + (match): touch on lookup + 2001-10-27 Jon Trowbridge * backend/pas/pas-book.c (pas_book_check_queue): Added paranoid diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index e0c1ef7654..c7f2227300 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -594,7 +594,7 @@ local_record_from_ecard (EAddrLocalRecord *local, ECard *ecard, EAddrConduitCont gtk_object_ref (GTK_OBJECT (ecard)); simple = e_card_simple_new (ecard); - local->local.ID = e_pilot_map_lookup_pid (ctxt->map, ecard->id); + local->local.ID = e_pilot_map_lookup_pid (ctxt->map, ecard->id, TRUE); compute_status (ctxt, local, ecard->id); @@ -944,10 +944,12 @@ check_for_slow_setting (GnomePilotConduit *c, EAddrConduitContext *ctxt) if (map_count == 0) gnome_pilot_conduit_standard_set_slow (conduit, TRUE); - if (gnome_pilot_conduit_standard_get_slow (conduit)) + if (gnome_pilot_conduit_standard_get_slow (conduit)) { + ctxt->map->write_touched_only = TRUE; LOG (" doing slow sync\n"); - else + } else { LOG (" doing fast sync\n"); + } } static void @@ -1006,7 +1008,7 @@ card_removed (EBookView *book_view, const char *id, EAddrConduitContext *ctxt) archived = e_pilot_map_uid_is_archived (ctxt->map, id); /* If its deleted, not in the archive and not in the map its a list */ - if (!archived && e_pilot_map_lookup_pid (ctxt->map, id) == 0) + if (!archived && e_pilot_map_lookup_pid (ctxt->map, id, FALSE) == 0) return; coc = g_new0 (CardObjectChange, 1); @@ -1447,7 +1449,7 @@ match (GnomePilotConduitSyncAbs *conduit, g_return_val_if_fail (remote != NULL, -1); *local = NULL; - uid = e_pilot_map_lookup_uid (ctxt->map, remote->ID); + uid = e_pilot_map_lookup_uid (ctxt->map, remote->ID, TRUE); if (!uid) return 0; -- cgit v1.2.3