diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-05-07 08:41:35 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-05-07 08:41:35 +0800 |
commit | 51aa4cb7c216c9518516e0bada53ae97849a2bd0 (patch) | |
tree | f39f505d25dd132e0cbf5701a4663145bfac47e4 /addressbook/backend/ebook/e-book.c | |
parent | 7c90b45149b4a77de70db43a773a92f8977fdf48 (diff) | |
download | gsoc2013-evolution-51aa4cb7c216c9518516e0bada53ae97849a2bd0.tar.gz gsoc2013-evolution-51aa4cb7c216c9518516e0bada53ae97849a2bd0.tar.zst gsoc2013-evolution-51aa4cb7c216c9518516e0bada53ae97849a2bd0.zip |
Made a NULL callback just mean to not call back.
2000-05-07 Christopher James Lahey <clahey@helixcode.com>
* backend/ebook/e-book.c: Made a NULL callback just mean to not
call back.
* backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h:
Reordered fields. Added a get_const function to get a constant
string that persists until the simple is destroyed.
* gui/component/Makefile.am: Added e-addressbook-model.c and
e-addressbook-model.h and all of the libraries and includes that
they are dependent on.
* gui/component/addressbook-factory.c: Initialize e cursors.
* gui/component/addressbook.c: Added inactive code to display an
ETable view of the addressbook.
svn path=/trunk/; revision=2844
Diffstat (limited to 'addressbook/backend/ebook/e-book.c')
-rw-r--r-- | addressbook/backend/ebook/e-book.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c index 4acd15cba0..ce1c663073 100644 --- a/addressbook/backend/ebook/e-book.c +++ b/addressbook/backend/ebook/e-book.c @@ -118,7 +118,8 @@ e_book_do_response_create_card (EBook *book, return; } - ((EBookIdCallback) op->cb) (book, resp->status, resp->id, op->closure); + if (op->cb) + ((EBookIdCallback) op->cb) (book, resp->status, resp->id, op->closure); g_free (resp->id); g_free (op); } @@ -136,7 +137,8 @@ e_book_do_response_generic (EBook *book, "in local op queue!\n"); } - ((EBookCallback) op->cb) (book, resp->status, op->closure); + if (op->cb) + ((EBookCallback) op->cb) (book, resp->status, op->closure); g_free (op); } @@ -159,7 +161,8 @@ e_book_do_response_get_cursor (EBook *book, cursor = e_card_cursor_new(resp->cursor); - ((EBookCursorCallback) op->cb) (book, resp->status, cursor, op->closure); + if (op->cb) + ((EBookCursorCallback) op->cb) (book, resp->status, cursor, op->closure); /* * Release the remote Evolution_Book in the PAS. @@ -206,8 +209,9 @@ e_book_do_response_get_view (EBook *book, } book_view = e_book_view_new(resp->book_view, op->listener); - - ((EBookBookViewCallback) op->cb) (book, resp->status, book_view, op->closure); + + if (op->cb) + ((EBookBookViewCallback) op->cb) (book, resp->status, book_view, op->closure); /* * Release the remote Evolution_Book in the PAS. @@ -257,7 +261,8 @@ e_book_do_response_open (EBook *book, return; } - ((EBookCallback) op->cb) (book, resp->status, op->closure); + if (op->cb) + ((EBookCallback) op->cb) (book, resp->status, op->closure); g_free (op); } @@ -576,7 +581,6 @@ e_book_remove_card (EBook *book, g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (card != NULL, FALSE); g_return_val_if_fail (E_IS_CARD (card), FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_remove_card: No URI loaded!\n"); @@ -604,7 +608,6 @@ e_book_remove_card_by_id (EBook *book, g_return_val_if_fail (book != NULL, FALSE); g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (id != NULL, FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_remove_card_by_id: No URI loaded!\n"); @@ -649,7 +652,6 @@ e_book_add_card (EBook *book, g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (card != NULL, FALSE); g_return_val_if_fail (E_IS_CARD (card), FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_add_card: No URI loaded!\n"); @@ -684,7 +686,6 @@ e_book_add_vcard (EBook *book, g_return_val_if_fail (book != NULL, FALSE); g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (vcard != NULL, FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_add_vcard: No URI loaded!\n"); @@ -727,7 +728,6 @@ e_book_commit_card (EBook *book, g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (card != NULL, FALSE); g_return_val_if_fail (E_IS_CARD (card), FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_commit_card: No URI loaded!\n"); @@ -763,7 +763,6 @@ e_book_commit_vcard (EBook *book, g_return_val_if_fail (book != NULL, FALSE); g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (vcard != NULL, FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_commit_vcard: No URI loaded!\n"); |