From f7f988ab427eff03d1c05b6fdfa29105529849ca Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sun, 28 Oct 2001 03:37:28 +0000 Subject: free up all the book_data list stuff. 2001-10-27 Chris Toshok * gui/component/select-names/e-select-names-completion.c (e_select_names_completion_destroy): free up all the book_data list stuff. (e_select_names_completion_got_book_view_cb): deal with book_data being passed as the closure, and increment the pending_completion_seq counter. (e_select_names_completion_card_added_cb): deal with book_data being passwd as the closure. (e_select_names_completion_seq_complete_cb): same, and decrement the pending_completion_seq if we haven't gotten one for this book view before. (e_select_names_completion_stop_query): cancel all the book_data's. (e_select_names_completion_start_query): use the books_not_ready counter instead of book_ready. also, do e_book_get_book_view on each of the book's in our list. (e_select_names_completion_do_query): change to deal with our list. (e_select_names_completion_book_ready): decrement the book_not_ready counter. (e_select_names_completion_new): add the book we're created with to our list. (e_select_names_completion_add_book): implement. * gui/component/select-names/e-select-names-completion.h: add prototype for e_select_names_completion_add_book. * gui/component/select-names/e-select-names-manager.c (e_select_names_manager_new): use addressbook_config_data, and don't unref the db. (e_select_names_manager_create_entry): always add NULL for a book (which corresponds to the local book), and if the completion_book is present, add it to the list of books to complete again. svn path=/trunk/; revision=14270 --- .../gui/component/select-names/e-select-names-manager.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'addressbook/gui/component/select-names/e-select-names-manager.c') 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 d422265c02..10b7662b31 100644 --- a/addressbook/gui/component/select-names/e-select-names-manager.c +++ b/addressbook/gui/component/select-names/e-select-names-manager.c @@ -120,7 +120,7 @@ e_select_names_manager_new (void) CORBA_exception_init (&ev); - db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev); + db = addressbook_config_database (&ev); val = bonobo_config_get_string (db, "/Addressbook/Completion/uri", &ev); @@ -135,10 +135,6 @@ e_select_names_manager_new (void) else manager->completion_book = NULL; - CORBA_exception_init (&ev); - bonobo_object_release_unref (db, &ev); - CORBA_exception_free (&ev); - return manager; } @@ -500,7 +496,10 @@ e_select_names_manager_create_entry (ESelectNamesManager *manager, const char *i e_list_append (manager->entries, entry); g_free(entry); - comp = e_select_names_completion_new (manager->completion_book, section->model); + comp = e_select_names_completion_new (NULL, section->model); + if (manager->completion_book) + e_select_names_completion_add_book (E_SELECT_NAMES_COMPLETION (comp), + manager->completion_book); e_entry_enable_completion_full (eentry, comp, 50, completion_handler); gtk_object_set_data (GTK_OBJECT (eentry), "completion_handler", comp); -- cgit v1.2.3