diff options
Diffstat (limited to 'addressbook/backend/ebook/e-card.c')
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c index 4b85c33868..5c1efb42f5 100644 --- a/addressbook/backend/ebook/e-card.c +++ b/addressbook/backend/ebook/e-card.c @@ -4171,13 +4171,9 @@ struct _CardLoadData { }; static void -card_load_cb (EBook *book, EBookStatus status, gpointer closure) +card_get_cb (EBook *book, EBookStatus status, ECard *card, gpointer closure) { CardLoadData *data = (CardLoadData *) closure; - ECard *card = NULL; - - if (status == E_BOOK_STATUS_SUCCESS) - card = e_book_get_card (book, data->card_id); if (data->cb != NULL) data->cb (card, data->closure); @@ -4186,6 +4182,15 @@ card_load_cb (EBook *book, EBookStatus status, gpointer closure) g_free (data); } +static void +card_load_cb (EBook *book, EBookStatus status, gpointer closure) +{ + CardLoadData *data = (CardLoadData *) closure; + + if (status == E_BOOK_STATUS_SUCCESS) + e_book_get_card (book, data->card_id, card_get_cb, closure); +} + void e_card_load_uri (const gchar *uri, ECardCallback cb, gpointer closure) { |