* #17184: addressbook: cleanup

This commit is contained in:
Tristan Matthews
2012-11-06 15:14:35 -05:00
parent 2f90ca305c
commit b1dcc49e83

View File

@ -44,7 +44,7 @@
#include "eds.h" #include "eds.h"
#if EDS_CHECK_VERSION(3,5,3) #if EDS_CHECK_VERSION(3,5,3)
#include <libedataserver/libedataserver.h> #include <libedataserver/libedataserver.h>
#else #else /* < EDS 3.5.3 */
#include <libedataserver/e-source.h> #include <libedataserver/e-source.h>
#include <libebook/e-book-client.h> #include <libebook/e-book-client.h>
#endif #endif
@ -374,7 +374,7 @@ fill_books_data ()
g_list_free_full(list, g_object_unref); g_list_free_full(list, g_object_unref);
} }
#else #else /* EDS < 3.5.3 */
static book_data_t * static book_data_t *
create_book_data_from_source(ESource *source, ESourceGroup *group) create_book_data_from_source(ESource *source, ESourceGroup *group)
@ -439,7 +439,7 @@ determine_default_addressbook()
#if EDS_CHECK_VERSION(3,5,3) #if EDS_CHECK_VERSION(3,5,3)
{ {
#else #else /* < EDS 3.5.3 */
if (book_data->isdefault) { if (book_data->isdefault) {
current_uri = book_data->uri; current_uri = book_data->uri;
#endif #endif
@ -474,7 +474,7 @@ search_async_by_contacts (const char *query, int max_results, SearchAsyncHandler
return; return;
} }
Search_Handler_And_Data *had = g_new (Search_Handler_And_Data, 1); Search_Handler_And_Data *had = g_new0(Search_Handler_And_Data, 1);
// initialize search data // initialize search data
had->search_handler = handler; had->search_handler = handler;
@ -488,7 +488,7 @@ search_async_by_contacts (const char *query, int max_results, SearchAsyncHandler
ESource *source = e_source_registry_ref_source(registry, current_uid); ESource *source = e_source_registry_ref_source(registry, current_uid);
EBookClient *book_client = e_book_client_new(source, NULL); EBookClient *book_client = e_book_client_new(source, NULL);
g_object_unref(source); g_object_unref(source);
#else #else /* < EDS 3.5.3 */
EBookClient *book_client = e_book_client_new_from_uri(current_uri, NULL); EBookClient *book_client = e_book_client_new_from_uri(current_uri, NULL);
#endif #endif
if (!book_client) if (!book_client)