aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-09-20 09:22:38 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-09-20 09:22:38 +0800
commit808bbced26ba3d2960c001725468849bba703f05 (patch)
treeb59de41163cdf7ce4f320b28698b1116c73419a2
parent22e5de292315bdb63c57487f738a1b0aa69ac468 (diff)
downloadgsoc2013-evolution-808bbced26ba3d2960c001725468849bba703f05.tar
gsoc2013-evolution-808bbced26ba3d2960c001725468849bba703f05.tar.gz
gsoc2013-evolution-808bbced26ba3d2960c001725468849bba703f05.tar.bz2
gsoc2013-evolution-808bbced26ba3d2960c001725468849bba703f05.tar.lz
gsoc2013-evolution-808bbced26ba3d2960c001725468849bba703f05.tar.xz
gsoc2013-evolution-808bbced26ba3d2960c001725468849bba703f05.tar.zst
gsoc2013-evolution-808bbced26ba3d2960c001725468849bba703f05.zip
don't add to the complete list of cards if the card is a list
2001-09-19 JP Rosevear <jpr@ximian.com> * conduit/address-conduit.c (cursor_cb): don't add to the complete list of cards if the card is a list (card_added): don't add to the list of changes if the card is a list (card_changed): ditto (card_removed): ditto svn path=/trunk/; revision=13002
-rw-r--r--addressbook/ChangeLog9
-rw-r--r--addressbook/conduit/address-conduit.c29
2 files changed, 33 insertions, 5 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 22d63754e2..1c3dbb6a46 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,12 @@
+2001-09-19 JP Rosevear <jpr@ximian.com>
+
+ * conduit/address-conduit.c (cursor_cb): don't add to the complete
+ list of cards if the card is a list
+ (card_added): don't add to the list of changes if the card is a
+ list
+ (card_changed): ditto
+ (card_removed): ditto
+
2001-09-19 Jon Trowbridge <trow@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 ca0530033d..b45c841248 100644
--- a/addressbook/conduit/address-conduit.c
+++ b/addressbook/conduit/address-conduit.c
@@ -49,7 +49,7 @@
GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-#define CONDUIT_VERSION "0.1.1"
+#define CONDUIT_VERSION "0.1.2"
#ifdef G_LOG_DOMAIN
#undef G_LOG_DOMAIN
#endif
@@ -191,6 +191,9 @@ cursor_cb (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer closur
for (i = 0; i < length; i ++) {
ECard *card = e_card_cursor_get_nth (cursor, i);
+ if (e_card_evolution_list (card))
+ continue;
+
gtk_object_ref (GTK_OBJECT (card));
ctxt->cards = g_list_append (ctxt->cards, card);
}
@@ -565,9 +568,14 @@ card_added (EBookView *book_view, const GList *cards, EAddrConduitContext *ctxt)
const GList *l;
for (l = cards; l != NULL; l = l->next) {
- CardObjectChange *coc = g_new0 (CardObjectChange, 1);
+ ECard *card = E_CARD (l->data);
+ CardObjectChange *coc;
- coc->card = E_CARD (l->data);
+ if (e_card_evolution_list (card))
+ continue;
+
+ coc = g_new0 (CardObjectChange, 1);
+ coc->card = card;
coc->type = CARD_ADDED;
gtk_object_ref (GTK_OBJECT (coc->card));
@@ -583,8 +591,13 @@ card_changed (EBookView *book_view, const GList *cards, EAddrConduitContext *ctx
const GList *l;
for (l = cards; l != NULL; l = l->next) {
- CardObjectChange *coc = g_new0 (CardObjectChange, 1);
+ ECard *card = E_CARD (l->data);
+ CardObjectChange *coc;
+
+ if (e_card_evolution_list (card))
+ continue;
+ coc = g_new0 (CardObjectChange, 1);
coc->card = E_CARD (l->data);
coc->type = CARD_MODIFIED;
@@ -599,13 +612,19 @@ card_changed (EBookView *book_view, const GList *cards, EAddrConduitContext *ctx
static void
card_removed (EBookView *book_view, const char *id, EAddrConduitContext *ctxt)
{
- CardObjectChange *coc = g_new0 (CardObjectChange, 1);
+ CardObjectChange *coc;
+
+ /* If its deleted but not in the map its probably a list */
+ if (e_pilot_map_lookup_pid (ctxt->map, id) == 0)
+ return;
+ 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);
+
if (!e_pilot_map_uid_is_archived (ctxt->map, id))
g_hash_table_insert (ctxt->changed_hash, (gpointer)e_card_get_id (coc->card), coc);
}