aboutsummaryrefslogtreecommitdiffstats
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
parentcb8fd3a3304144f2d6c6c9842d00af6ac9ec3910 (diff)
downloadgsoc2013-evolution-2b1b1cefe98ed500d6add08a5828f5c46aa3000a.tar
gsoc2013-evolution-2b1b1cefe98ed500d6add08a5828f5c46aa3000a.tar.gz
gsoc2013-evolution-2b1b1cefe98ed500d6add08a5828f5c46aa3000a.tar.bz2
gsoc2013-evolution-2b1b1cefe98ed500d6add08a5828f5c46aa3000a.tar.lz
gsoc2013-evolution-2b1b1cefe98ed500d6add08a5828f5c46aa3000a.tar.xz
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
-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