aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog4
-rw-r--r--addressbook/conduit/address-conduit.c39
2 files changed, 26 insertions, 17 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 258705dad0..8be281e512 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,7 @@
+2003-03-31 JP Rosevear <jpr@ximian.com>
+
+ * conduit/address-conduit.c (card_removed): it emits a list now
+
2003-03-31 Dan Winship <danw@ximian.com>
* gui/component/select-names/e-select-names.c
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c
index 8bca97d9b9..504aed4301 100644
--- a/addressbook/conduit/address-conduit.c
+++ b/addressbook/conduit/address-conduit.c
@@ -1293,28 +1293,33 @@ card_changed (EBookView *book_view, const GList *cards, EAddrConduitContext *ctx
static void
-card_removed (EBookView *book_view, const char *id, EAddrConduitContext *ctxt)
+card_removed (EBookView *book_view, GList *ids, EAddrConduitContext *ctxt)
{
- CardObjectChange *coc;
- gboolean archived;
-
- archived = e_pilot_map_uid_is_archived (ctxt->map, id);
+ GList *l;
+
+ for (l = ids; l != NULL; l = l->next) {
+ const char *id = l->data;
+ CardObjectChange *coc;
+ gboolean archived;
+
+ 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, FALSE) == 0)
- return;
+ /* 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, FALSE) == 0)
+ return;
- coc = g_new0 (CardObjectChange, 1);
- coc->card = e_card_new ("");
- e_card_set_id (coc->card, id);
- coc->type = CARD_DELETED;
+ coc = g_new0 (CardObjectChange, 1);
+ coc->card = e_card_new ("");
+ e_card_set_id (coc->card, id);
+ coc->type = CARD_DELETED;
- ctxt->changed = g_list_prepend (ctxt->changed, coc);
+ ctxt->changed = g_list_prepend (ctxt->changed, coc);
- if (!archived)
- g_hash_table_insert (ctxt->changed_hash, (gpointer)e_card_get_id (coc->card), coc);
- else
- e_pilot_map_remove_by_uid (ctxt->map, id);
+ if (!archived)
+ g_hash_table_insert (ctxt->changed_hash, (gpointer)e_card_get_id (coc->card), coc);
+ else
+ e_pilot_map_remove_by_uid (ctxt->map, id);
+ }
}
static void