diff options
author | Chris Toshok <toshok@ximian.com> | 2004-05-20 09:16:30 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2004-05-20 09:16:30 +0800 |
commit | 47c3838fee257737f17aae3696a8dda177af7a35 (patch) | |
tree | 700f2c3e3cd6fe3b13eeff901c7ea3c49daf76a6 /addressbook/gui/component/addressbook.c | |
parent | 5bc91a74fecf9f6eecff4281408743ab694e26df (diff) | |
download | gsoc2013-evolution-47c3838fee257737f17aae3696a8dda177af7a35.tar gsoc2013-evolution-47c3838fee257737f17aae3696a8dda177af7a35.tar.gz gsoc2013-evolution-47c3838fee257737f17aae3696a8dda177af7a35.tar.bz2 gsoc2013-evolution-47c3838fee257737f17aae3696a8dda177af7a35.tar.lz gsoc2013-evolution-47c3838fee257737f17aae3696a8dda177af7a35.tar.xz gsoc2013-evolution-47c3838fee257737f17aae3696a8dda177af7a35.tar.zst gsoc2013-evolution-47c3838fee257737f17aae3696a8dda177af7a35.zip |
use the new e_book_new and e_book_open apis.
2004-05-19 Chris Toshok <toshok@ximian.com>
* 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
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r-- | addressbook/gui/component/addressbook.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index d9628eeb50..83c56e4b6d 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -225,23 +225,23 @@ load_source_cb (EBook *book, EBookStatus status, gpointer closure) } guint -addressbook_load_source (EBook *book, ESource *source, - EBookCallback cb, gpointer closure) +addressbook_load (EBook *book, + EBookCallback cb, gpointer closure) { LoadSourceData *load_source_data = g_new0 (LoadSourceData, 1); load_source_data->cb = cb; load_source_data->closure = closure; - load_source_data->source = g_object_ref (source); + load_source_data->source = g_object_ref (g_object_ref (e_book_get_source (book))); load_source_data->cancelled = FALSE; - e_book_async_load_source (book, source, load_source_cb, load_source_data); + e_book_async_open (book, FALSE, load_source_cb, load_source_data); return GPOINTER_TO_UINT (load_source_data); } void -addressbook_load_source_cancel (guint id) +addressbook_load_cancel (guint id) { LoadSourceData *load_source_data = GUINT_TO_POINTER (id); @@ -263,11 +263,16 @@ void addressbook_load_default_book (EBookCallback cb, gpointer closure) { LoadSourceData *load_source_data = g_new (LoadSourceData, 1); + EBook *book; load_source_data->cb = cb; load_source_data->source = NULL; load_source_data->closure = closure; load_source_data->cancelled = FALSE; - e_book_async_get_default_addressbook (default_book_cb, load_source_data); + book = e_book_new_default_addressbook (NULL); + if (!book) + load_source_cb (NULL, E_BOOK_ERROR_OTHER_ERROR, closure); /* XXX we should just use a GError and it's error code here */ + + e_book_async_open (book, FALSE, default_book_cb, load_source_data); } |