diff options
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 9 | ||||
-rw-r--r-- | addressbook/conduit/address-conduit.c | 29 |
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); } |