diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c index 533c37eb71d3a84ac663e66a239e78d946cb03ee..3392223e2628f0c25d79f3da2fa1261abf983535 100644 --- a/sflphone-client-gnome/src/contacts/searchbar.c +++ b/sflphone-client-gnome/src/contacts/searchbar.c @@ -84,11 +84,12 @@ static void cbox_changed_cb (GtkWidget *widget, gpointer user_data UNUSED) { gchar *name; - DEBUG ("Searchbar: CBOX changed callback"); + DEBUG ("Searchbar: Addressbook changed callback"); name = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget)); if(abookfactory_is_addressbook_loaded()) { + DEBUG("Searchbar: Set new addressbook"); AddrBookFactory *factory = abookfactory_get_factory(); factory->addrbook->set_current_book (name); AddressBook_Config *addressbook_config; diff --git a/sflphone-plugins/plugin/addressbook/addressbook.c b/sflphone-plugins/plugin/addressbook/addressbook.c index 96f5c2e5a7d0a90f46df70966d22ee1158ba2b12..68f3ea50d78b6f2e401bc282f91a7ad91db96bd1 100644 --- a/sflphone-plugins/plugin/addressbook/addressbook.c +++ b/sflphone-plugins/plugin/addressbook/addressbook.c @@ -235,9 +235,22 @@ handler_async_search (GList *hits, gpointer user_data) */ void addressbook_set_search_type(AddrbookSearchType searchType) { - + switch(searchType) { + case ABOOK_QUERY_IS: + set_current_addressbook_test(E_BOOK_QUERY_IS); + break; + case ABOOK_QUERY_BEGINS_WITH: + set_current_addressbook_test(E_BOOK_QUERY_BEGINS_WITH); + break; + case ABOOK_QUERY_CONTAINS: + set_current_addresbook_test(E_BOOK_QUERY_CONTAINS); + break; + default: + printf("Addressbook: Error: Unsupported search type"); + break; + } } void addressbook_set_current_book(gchar *current) { - + set_current_addressbook(current); }