diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-03-26 16:04:41 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-03-26 16:04:41 +0800 |
commit | d8bd459cb946fa102fe802fccefb76236bd8c42a (patch) | |
tree | aaab51cb8418594b43206173a8b1723da362c963 /addressbook/backend | |
parent | 8e9818c86f559fee079fb6752e9a7c61e2591453 (diff) | |
download | gsoc2013-evolution-d8bd459cb946fa102fe802fccefb76236bd8c42a.tar gsoc2013-evolution-d8bd459cb946fa102fe802fccefb76236bd8c42a.tar.gz gsoc2013-evolution-d8bd459cb946fa102fe802fccefb76236bd8c42a.tar.bz2 gsoc2013-evolution-d8bd459cb946fa102fe802fccefb76236bd8c42a.tar.lz gsoc2013-evolution-d8bd459cb946fa102fe802fccefb76236bd8c42a.tar.xz gsoc2013-evolution-d8bd459cb946fa102fe802fccefb76236bd8c42a.tar.zst gsoc2013-evolution-d8bd459cb946fa102fe802fccefb76236bd8c42a.zip |
Load an ECard instead of a VCard and then get the VCard from that ECard.
2000-03-26 Christopher James Lahey <clahey@helixcode.com>
* addressbook/backend/ebook/test-client.c: Load an ECard instead
of a VCard and then get the VCard from that ECard. Just tests
ECard and the client stuff at the same time. Also, replaces
carriage returns with newlines.
* addressbook/backend/ebook/e-book.c: Fixed a small parity error.
svn path=/trunk/; revision=2169
Diffstat (limited to 'addressbook/backend')
-rw-r--r-- | addressbook/backend/ebook/e-book.c | 2 | ||||
-rw-r--r-- | addressbook/backend/ebook/test-client.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c index 16819c334a..b3c2e12b57 100644 --- a/addressbook/backend/ebook/e-book.c +++ b/addressbook/backend/ebook/e-book.c @@ -400,7 +400,7 @@ e_book_get_card (EBook *book, g_return_val_if_fail (book != NULL, NULL); g_return_val_if_fail (E_IS_BOOK (book), NULL); - if (! book->priv->load_state != URILoaded) { + if (book->priv->load_state != URILoaded) { g_warning ("e_book_get_card: No URI loaded!\n"); return NULL; } diff --git a/addressbook/backend/ebook/test-client.c b/addressbook/backend/ebook/test-client.c index dce7e7fc87..365019f7bd 100644 --- a/addressbook/backend/ebook/test-client.c +++ b/addressbook/backend/ebook/test-client.c @@ -51,17 +51,21 @@ static void add_card_cb (EBook *book, EBookStatus status, gpointer closure) { char *vcard; + ECard *card; GTimer *timer; printf ("Status: %d\n", status); timer = g_timer_new (); g_timer_start (timer); - vcard = e_book_get_vcard (book, "foo"); + card = e_book_get_card (book, "foo"); g_timer_stop (timer); + vcard = e_card_get_vcard(card); printf ("%g\n", g_timer_elapsed (timer, NULL)); printf ("[%s]\n", vcard); + g_free(vcard); + gtk_object_unref(GTK_OBJECT(card)); } static void |