From 79a4d5a123547b18d9e513e3fb02eb4bf9999451 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 13 Aug 2002 01:01:58 +0000 Subject: If invoked from a non-contact folder, add the contact to the default * gui/component/addressbook-component.c (user_create_new_item_cb): If invoked from a non-contact folder, add the contact to the default contact folder, not the local one. If invoked from a contact folder, don't append "addressbook.db" to the URI, let ebook do the right thing. Fixes #28327 and #28325. * backend/idl/addressbook.idl (CallStatus): Add NoSuchBook. (Initially intended as part of a fix for #28327, but the other changes make it so the error code never ends up getting used any more, but it's still good to have.) * gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog): Handle NO_SUCH_BOOK. * backend/ebook/e-book-types.h (EBookStatus): Add E_BOOK_STATUS_NO_SUCH_BOOK. * backend/ebook/e-book-listener.c (e_book_listener_convert_status): add case for NoSuchBook. * backend/ebook/e-book-util.c (e_book_load_local_address_book): Kill this. Nothing should ever explicitly load the local addressbook. (e_book_use_default_book): Replaces e_book_use_local_address_book, using the default book instead. (e_book_default_book_open): Fall back to local contact folder on E_BOOK_STATUS_NO_SUCH_BOOK too. (e_book_query_address_default): Use default book, not local. * gui/component/e-address-widget.c (query_idle_fn): Use the default book, not the local book. * gui/component/select-names/e-select-names-popup.c (edit_contact_info_cb): Use the default book, not the local book. * backend/ebook/e-destination.c (e_destination_cardify): Use the default book, not the local book. (e_destination_touch): Query the default book, not the local book. * backend/ebook/e-card-compare.c (e_card_locate_match, e_card_locate_match_full): Use the default book, not the local book. svn path=/trunk/; revision=17764 --- addressbook/backend/ebook/e-destination.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addressbook/backend/ebook/e-destination.c') diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c index 5cb5fa859f..c83d908e9b 100644 --- a/addressbook/backend/ebook/e-destination.c +++ b/addressbook/backend/ebook/e-destination.c @@ -1034,7 +1034,7 @@ launch_cardify_query (EDestination *dest) } static void -use_local_book_cb (EBook *book, gpointer closure) +use_default_book_cb (EBook *book, gpointer closure) { EDestination *dest = E_DESTINATION (closure); if (dest->priv->cardify_book == NULL) { @@ -1108,7 +1108,7 @@ e_destination_cardify (EDestination *dest, EBook *book) if (dest->priv->cardify_book != NULL) { launch_cardify_query (dest); } else { - e_book_use_local_address_book (use_local_book_cb, dest); + e_book_use_default_book (use_default_book_cb, dest); } } @@ -1673,7 +1673,7 @@ e_destination_touch (EDestination *dest) email = e_destination_get_email (dest); if (email) - e_book_query_address_locally (email, touch_cb, NULL); + e_book_query_address_default (email, touch_cb, NULL); } } -- cgit