Skip to content
Snippets Groups Projects
Commit 66018b6e authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#6054: Fix addressbook plugin compilation warning

parent 2871f537
Branches
Tags
No related merge requests found
......@@ -8,7 +8,7 @@ AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
AC_CONFIG_MACRO_DIR([m4])
dnl Silent build by default. Use make V=1 to increase verbosity
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([no])])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_ARG_WITH(debug,
AS_HELP_STRING(
......
......@@ -32,11 +32,6 @@
#include "eds.h"
#include "addressbook.h"
//#include "searchbar.h"
// #include "addressbook-config.h"
// static void
// handler_async_search (GList *, gpointer);
/**
* Perform a search on address book
......@@ -44,17 +39,9 @@
void
addressbook_search (AddrBookHandle *handle, GtkEntry* entry, AddressBook_Config *addressbook_config)
{
printf("Addressbook: Search");
const gchar* query = gtk_entry_get_text (GTK_ENTRY (entry));
printf("Addressbook: Search %s\n", query);
// AddressBook_Config *addressbook_config;
// activateWaitingLayer();
// addressbook_config_load_parameters (&addressbook_config);
search_async_by_contacts (gtk_entry_get_text (GTK_ENTRY (entry)), addressbook_config->max_results, handle->search_cb, addressbook_config);
}
......@@ -65,14 +52,7 @@ addressbook_search (AddrBookHandle *handle, GtkEntry* entry, AddressBook_Config
gboolean
addressbook_is_enabled()
{
AddressBook_Config *addressbook_config;
printf("Addresbook: is enabled\n");
// Load the address book parameters
// addressbook_config_load_parameters (&addressbook_config);
return (gboolean) addressbook_config->enable;
return TRUE;
}
/**
......@@ -81,8 +61,6 @@ addressbook_is_enabled()
gboolean
addressbook_is_ready()
{
printf("Addressbook: is ready\n");
return books_ready();
}
......@@ -92,7 +70,6 @@ addressbook_is_ready()
gboolean
addressbook_is_active()
{
printf("Addressbook: is active\n");
return books_active();
}
......@@ -164,76 +141,6 @@ addressbook_init(gchar **book_list)
init_eds();
}
/**
* Callback called after all book have been processed
*/
/*
static void
handler_async_search (GList *hits, gpointer user_data)
{
GList *i;
GdkPixbuf *photo = NULL;
AddressBook_Config *addressbook_config;
callable_obj_t *j;
printf("Addressbook: callback async search\n");
// freeing calls
while ( (j = (callable_obj_t *) g_queue_pop_tail (contacts->callQueue)) != NULL) {
free_callable_obj_t (j);
}
// Retrieve the address book parameters
addressbook_config = (AddressBook_Config*) user_data;
// reset previous results
calltree_reset (contacts);
calllist_reset (contacts);
for (i = hits; i != NULL; i = i->next) {
Hit *entry;
entry = i->data;
if (entry) {
// Get the photo
if (addressbook_display (addressbook_config,
ADDRESSBOOK_DISPLAY_CONTACT_PHOTO))
photo = entry->photo;
// Create entry for business phone information
if (addressbook_display (addressbook_config,
ADDRESSBOOK_DISPLAY_PHONE_BUSINESS))
calllist_add_contact (entry->name, entry->phone_business,
CONTACT_PHONE_BUSINESS, photo);
// Create entry for home phone information
if (addressbook_display (addressbook_config,
ADDRESSBOOK_DISPLAY_PHONE_HOME))
calllist_add_contact (entry->name, entry->phone_home,
CONTACT_PHONE_HOME, photo);
// Create entry for mobile phone iddnformation
if (addressbook_display (addressbook_config,
ADDRESSBOOK_DISPLAY_PHONE_MOBILE))
calllist_add_contact (entry->name, entry->phone_mobile,
CONTACT_PHONE_MOBILE, photo);
}
free_hit (entry);
}
g_list_free (hits);
// Deactivate waiting image
// deactivateWaitingLayer();
gtk_widget_grab_focus (GTK_WIDGET (contacts->view));
}
*/
void addressbook_set_search_type(AddrbookSearchType searchType) {
switch(searchType) {
case ABOOK_QUERY_IS:
......@@ -243,7 +150,7 @@ void addressbook_set_search_type(AddrbookSearchType searchType) {
set_current_addressbook_test(E_BOOK_QUERY_BEGINS_WITH);
break;
case ABOOK_QUERY_CONTAINS:
set_current_addresbook_test(E_BOOK_QUERY_CONTAINS);
set_current_addressbook_test(E_BOOK_QUERY_CONTAINS);
break;
default:
printf("Addressbook: Error: Unsupported search type");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment