aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/conduit/address-conduit.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-03-31 23:44:56 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-03-31 23:44:56 +0800
commit2b1b1cefe98ed500d6add08a5828f5c46aa3000a (patch)
tree6b76183f52e0c891bd242055e32927d0f8c11b4a /addressbook/conduit/address-conduit.c
parentcb8fd3a3304144f2d6c6c9842d00af6ac9ec3910 (diff)
downloadgsoc2013-evolution-2b1b1cefe98ed500d6add08a5828f5c46aa3000a.tar.gz
gsoc2013-evolution-2b1b1cefe98ed500d6add08a5828f5c46aa3000a.tar.zst
gsoc2013-evolution-2b1b1cefe98ed500d6add08a5828f5c46aa3000a.zip
it emits a list now
2003-03-31 JP Rosevear <jpr@ximian.com> * conduit/address-conduit.c (card_removed): it emits a list now svn path=/trunk/; revision=20598
Diffstat (limited to 'addressbook/conduit/address-conduit.c')
-rw-r--r--addressbook/conduit/address-conduit.c39
1 files changed, 22 insertions, 17 deletions
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