From 47c3838fee257737f17aae3696a8dda177af7a35 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Thu, 20 May 2004 01:16:30 +0000 Subject: use the new e_book_new and e_book_open apis. 2004-05-19 Chris Toshok * importers/evolution-vcard-importer.c (load_file_fn): use the new e_book_new and e_book_open apis. * importers/evolution-ldif-importer.c (load_file_fn): use the new e_book_new and e_book_open apis. * gui/widgets/eab-gui-util.c (eab_transfer_contacts): use the new e_book_new and e_book_async_open apis. * gui/contact-editor/e-contact-editor.c (cancel_load): addressbook_load_source_cancel -> addressbook_load_cancel. (source_selected): use the new e_book_new and addressbook_load. * gui/component/select-names/e-select-names.c (addressbook_model_set_source): use the new e_book_new and addressbook_load. * gui/component/select-names/e-select-names-manager.c (update_completion_books): use the new e_book_new and addressbook_load. * gui/component/addressbook.h: rename addressbook_load_source{_cancel} to addressbook_load{_cancel}, and remove the source arg. * gui/component/addressbook.c (addressbook_load): rename since we aren't passing a source anymore. (addressbook_load_cancel): same. (addressbook_load_default_book): use the new e_book_new_* apis. * gui/component/addressbook-view.c (delete_addressbook_cb): just use e_book_new, not e_book_load_source. (selector_tree_drag_data_received): switch to new e_book_new_*/e_book_open apis. (activate_source): same, and addressbook_load_source -> addressbook_load. * gui/component/addressbook-migrate.c (migrate_contact_folder_to_source): switch to new e_book_new_*/e_book_open apis. (migrate_contact_lists_for_local_folders): same. (migrate_company_phone_for_local_folders): same. * conduit/address-conduit.c (pre_sync): switch to new e_book_new_*/e_book_open apis. svn path=/trunk/; revision=25999 --- addressbook/gui/component/addressbook-migrate.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'addressbook/gui/component/addressbook-migrate.c') diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c index 32fbf1ca3e..7b3bf2b38e 100644 --- a/addressbook/gui/component/addressbook-migrate.c +++ b/addressbook/gui/component/addressbook-migrate.c @@ -341,14 +341,16 @@ migrate_contact_folder_to_source (MigrationContext *context, char *old_path, ESo dialog_set_folder_name (context, e_source_peek_name (new_source)); - old_book = e_book_new (); - if (!e_book_load_source (old_book, old_source, TRUE, &e)) { + old_book = e_book_new (old_source, &e); + if (!old_book + || !e_book_open (old_book, TRUE, &e)) { g_warning ("failed to load source book for migration: `%s'", e->message); goto finish; } - new_book = e_book_new (); - if (!e_book_load_source (new_book, new_source, FALSE, &e)) { + new_book = e_book_new (new_source, &e); + if (!new_book + || e_book_open (new_book, FALSE, &e)) { g_warning ("failed to load destination book for migration: `%s'", e->message); goto finish; } @@ -779,8 +781,9 @@ migrate_contact_lists_for_local_folders (MigrationContext *context, ESourceGroup dialog_set_folder_name (context, e_source_peek_name (source)); - book = e_book_new (); - if (!e_book_load_source (book, source, TRUE, NULL)) { + book = e_book_new (source, NULL); + if (!book + || !e_book_open (book, TRUE, NULL)) { char *uri = e_source_get_uri (source); g_warning ("failed to migrate contact lists for source %s", uri); g_free (uri); @@ -853,8 +856,9 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup dialog_set_folder_name (context, e_source_peek_name (source)); - book = e_book_new (); - if (!e_book_load_source (book, source, TRUE, NULL)) { + book = e_book_new (source, NULL); + if (!book + || !e_book_open (book, TRUE, NULL)) { char *uri = e_source_get_uri (source); g_warning ("failed to migrate company phone numbers for source %s", uri); g_free (uri); -- cgit