diff options
Diffstat (limited to 'addressbook/gui/component/select-names')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-manager.c | 13 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names.c | 14 |
2 files changed, 24 insertions, 3 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-manager.c b/addressbook/gui/component/select-names/e-select-names-manager.c index e095f7308f..a3001efbd1 100644 --- a/addressbook/gui/component/select-names/e-select-names-manager.c +++ b/addressbook/gui/component/select-names/e-select-names-manager.c @@ -399,9 +399,20 @@ load_completion_books (ESelectNamesManager *manager) for (f = folders; f && f->physical_uri; f++) { EBook *book = e_book_new (); + ESourceGroup *group; + ESource *source; + g_object_ref (manager); /* ref ourself before our async call */ - addressbook_load_uri (book, f->physical_uri, (EBookCallback)open_book_cb, manager); + /* FIXME: Store source UIDs in folder list and use those to get sources */ + group = e_source_group_new ("", f->physical_uri); + source = e_source_new ("", ""); + e_source_set_group (source, group); + + addressbook_load_source (book, source, (EBookCallback)open_book_cb, manager); + + g_object_unref (group); + g_object_unref (source); } e_folder_list_free_items (folders); } diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index 4423107fca..b533696cfa 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -34,7 +34,6 @@ #include <addressbook/gui/widgets/e-addressbook-table-adapter.h> #include <addressbook/util/eab-book-util.h> #include <addressbook/gui/component/addressbook-component.h> -#include <addressbook/gui/component/addressbook-storage.h> #include <addressbook/gui/component/addressbook.h> #include <shell/evolution-shell-client.h> #include <shell/evolution-folder-selector-button.h> @@ -133,6 +132,8 @@ static void addressbook_model_set_uri(ESelectNames *e_select_names, EABModel *model, const char *uri) { EBook *book; + ESourceGroup *group; + ESource *source; /* If uri == the current uri, then we don't have to do anything */ book = eab_model_get_ebook (model); @@ -147,7 +148,16 @@ addressbook_model_set_uri(ESelectNames *e_select_names, EABModel *model, const c g_object_ref(e_select_names); g_object_ref(model); - addressbook_load_uri(book, uri, (EBookCallback) set_book, e_select_names); + + /* FIXME: Store source UIDs in last_used etc. and use that to get sources */ + group = e_source_group_new ("", uri); + source = e_source_new ("", ""); + e_source_set_group (source, group); + + addressbook_load_source (book, source, (EBookCallback) set_book, e_select_names); + + g_object_unref (group); + g_object_unref (source); } static void * |