diff options
author | Chris Toshok <toshok@ximian.com> | 2003-02-07 15:14:34 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2003-02-07 15:14:34 +0800 |
commit | aeec7106f7a3d6d1e4479c2ec596a506c4c281fa (patch) | |
tree | 1e84b323a01d8a2e88ca09d841d187643a564a85 /addressbook/backend/ebook/e-book.c | |
parent | fe77d02dd0637587aa417a329914feb37508a1ef (diff) | |
download | gsoc2013-evolution-aeec7106f7a3d6d1e4479c2ec596a506c4c281fa.tar.gz gsoc2013-evolution-aeec7106f7a3d6d1e4479c2ec596a506c4c281fa.tar.zst gsoc2013-evolution-aeec7106f7a3d6d1e4479c2ec596a506c4c281fa.zip |
check the status, not the book, and unref the book here.
2003-02-06 Chris Toshok <toshok@ximian.com>
* gui/component/e-address-popup.c (email_table_save_card_cb):
check the status, not the book, and unref the book here.
(contact_editor_cb): same.
(start_query): unref the book in the failure case.
(add_card_idle_cb): addressbook_load_default_book returns void
now.
(edit_contact_info_cb): same.
(e_address_popup_query): same.
* gui/component/addressbook.c (control_activate_cb): track change
to addressbook_load_uri return type.
(set_prop): same.
(addressbook_load_uri): return type is void now.
(addressbook_load_default_book): same.
* gui/component/addressbook.h:
addressbook_load_uri/addressbook_load_default_book return void
now.
* conduit/address-conduit.c (start_addressbook_server):
e_book_load_default_book returns void now.
* backend/ebook/e-book-util.h: track changes to return types.
* backend/ebook/e-book-util.c (e_book_load_address_book_by_uri):
fallout from change to e_book_load_uri. return type for this
function is void now too.
(e_book_use_address_book_by_uri): same.
(e_book_use_default_book): same.
(e_book_load_default_book): same.
(got_uri_book_cb): if unsuccessful and book is non-NULL, unref it
here.
(got_default_book_cb): same.
* backend/ebook/e-book.c (e_book_load_uri): no longer return a
gboolean. any error is communicated to the callback.
* backend/ebook/e-book.h: e_book_load_uri no longer returns a
gboolean (it's void.)
* backend/ebook/evolution-ldif-importer.c (ebook_create): track
change to the e_book_load_uri family of functions.
* backend/ebook/test-client-list.c (ebook_create): same.
* backend/ebook/test-client.c (ebook_create): same.
* backend/ebook/load-pine-addressbook.c (ebook_create): same.
* backend/ebook/evolution-vcard-importer.c (ebook_create): same.
svn path=/trunk/; revision=19839
Diffstat (limited to 'addressbook/backend/ebook/e-book.c')
-rw-r--r-- | addressbook/backend/ebook/e-book.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c index 195418d29b..fff07bcfb9 100644 --- a/addressbook/backend/ebook/e-book.c +++ b/addressbook/backend/ebook/e-book.c @@ -729,7 +729,7 @@ activate_factories_for_uri (EBook *book, const char *uri) return retval; } -gboolean +void e_book_load_uri (EBook *book, const char *uri, EBookCallback open_response, @@ -738,21 +738,21 @@ e_book_load_uri (EBook *book, EBookLoadURIData *load_uri_data; GNOME_Evolution_Addressbook_BookFactory factory; - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - g_return_val_if_fail (uri != NULL, FALSE); - g_return_val_if_fail (open_response != NULL, FALSE); + g_return_if_fail (book != NULL); + g_return_if_fail (E_IS_BOOK (book)); + g_return_if_fail (uri != NULL); + g_return_if_fail (open_response != NULL); if (book->priv->load_state != URINotLoaded) { g_warning ("e_book_load_uri: Attempted to load a URI " "on a book which already has a URI loaded!\n"); - return FALSE; + open_response (book, E_BOOK_STATUS_OTHER_ERROR, closure); /* XXX need a new status code here */ + return; } /* try to find a list of factories that can handle the protocol */ if (!activate_factories_for_uri (book, uri)) { - open_response (NULL, E_BOOK_STATUS_PROTOCOL_NOT_SUPPORTED, closure); - return FALSE; + open_response (book, E_BOOK_STATUS_PROTOCOL_NOT_SUPPORTED, closure); } g_free (book->priv->uri); @@ -764,7 +764,8 @@ e_book_load_uri (EBook *book, book->priv->listener = e_book_listener_new (); if (book->priv->listener == NULL) { g_warning ("e_book_load_uri: Could not create EBookListener!\n"); - return FALSE; + open_response (NULL, E_BOOK_STATUS_OTHER_ERROR, closure); /* XXX need a new status code here */ + return; } g_signal_connect (book->priv->listener, "responses_queued", @@ -782,10 +783,6 @@ e_book_load_uri (EBook *book, e_book_load_uri_from_factory (book, factory, load_uri_data); book->priv->load_state = URILoading; - - /* Now we play the waiting game. */ - - return TRUE; } /** |