From b64f547cdd71098035e9b055ee7f0ec4de2b9e1c Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 19 Dec 2001 15:16:32 +0000 Subject: go slow and clear the map if the last uri and the current uri do not match 2001-12-18 JP Rosevear * conduit/address-conduit.c (check_for_slow_setting): go slow and clear the map if the last uri and the current uri do not match (post_sync): save the last uri * conduits/address-conduit-config.h: handle a last uri config option 2001-12-18 Chris Toshok * gui/component/addressbook.c (addressbook_default_book_open): change this to match its e-book counterpart, and only failover to the local addressbook if the protocol wasn't supported. that way errors like "failure to connect" are still reported to the user. * backend/ebook/e-book-util.h: add prototypes for e_book_load_default_book and e_book_get_config_database. * backend/ebook/e-book-util.c (e_book_default_book_open): new function, basically cut and paste addressbook_default_book_open from addressbook.c here. (e_book_load_default_book): cut and past addressbook_load_default_book here, pretty much, except leave off the auth stuff. (e_book_get_config_database): new function, returns the Bonobo_ConfigDatabase for e_book_load_default_book to use. * conduit/address-conduit.c (start_addressbook_server): use e_book_load_default_book here. svn path=/trunk/; revision=15178 --- addressbook/gui/component/addressbook.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 4741e5196a..619a89cdd5 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -699,7 +699,12 @@ addressbook_default_book_open (EBook *book, EBookStatus status, gpointer closure g_free (default_book_closure); - if (status != E_BOOK_STATUS_SUCCESS) { + /* special case the protocol not supported error, since we + really only want to failover to the local book in the case + where there's no installed backend for that protocol. all + other errors (failure to connect, etc.) should get reported + to the caller as normal. */ + if (status == E_BOOK_STATUS_PROTOCOL_NOT_SUPPORTED) { e_book_load_local_address_book (book, user_response, user_closure); } else { -- cgit v1.2.3