diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 8afcee10ed5fe2d99e92988650766ee7d780bf63..20993eb79916b338d72e96a4d8410fef400c5ff0 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -41,6 +41,7 @@ #include "uimanager.h" #include "actions.h" #include "../imwindow.h" +#include "searchbar.h" GtkWidget *sw; GtkCellRenderer *rend; @@ -1400,6 +1401,8 @@ void calltree_display (calltab_t *tab) } gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton, TRUE); + + set_forcus_on_addressbook_searchbar(); } else diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c index a10ff4461f7b0bad28591d3259553875cb7630f3..3b511689784ce528daa88e2498fa204a9648612c 100644 --- a/sflphone-client-gnome/src/contacts/searchbar.c +++ b/sflphone-client-gnome/src/contacts/searchbar.c @@ -53,7 +53,6 @@ GdkPixbuf *outgoing_pixbuf = NULL; GdkPixbuf *missed_pixbuf = NULL; - void searchbar_addressbook_activated (GtkEntry *entry, gchar *arg1 UNUSED, gpointer data UNUSED) { DEBUG ("Searchbar: Entry activated"); @@ -86,6 +85,11 @@ static void cbox_changed_cb (GtkWidget *widget, gpointer user_data UNUSED) addressbook_search (GTK_ENTRY (addressbookentry)); } +void set_forcus_on_addressbook_searchbar () +{ + gtk_widget_grab_focus (addressbookentry); +} + void update_searchbar_addressbook_list() { gint count; @@ -263,7 +267,7 @@ GtkWidget *addressbook_menu_new (void) void focus_on_searchbar_out() { - DEBUG ("set_focus_on_searchbar_out"); + DEBUG ("Searchbar: Unset focus from search bar"); // gtk_widget_grab_focus(GTK_WIDGET(sw)); focus_is_on_searchbar = FALSE; } @@ -271,7 +275,7 @@ focus_on_searchbar_out() void focus_on_searchbar_in() { - DEBUG ("set_focus_on_searchbar_in"); + DEBUG ("Searchbar: Set focus on search bar"); // gtk_widget_grab_focus(GTK_WIDGET(sw)); focus_is_on_searchbar = TRUE; } diff --git a/sflphone-client-gnome/src/contacts/searchbar.h b/sflphone-client-gnome/src/contacts/searchbar.h index a15ab720c1b9dcd71349296fbffde393e596b2ba..10ed938162eba85582c429dbb8940cee1c1a163c 100644 --- a/sflphone-client-gnome/src/contacts/searchbar.h +++ b/sflphone-client-gnome/src/contacts/searchbar.h @@ -57,15 +57,20 @@ GdkPixbuf *waitingPixOff; SearchType HistorySearchType; /** - * Create a new search bar with "type" passed in - * parameter + * Create a new search bar for call hostory */ GtkWidget* history_searchbar_new (void); + +/** + * Create a new search bar for addressbook + */ GtkWidget* contacts_searchbar_new (void); +/** + * Get type of call to be search from call history + */ SearchType get_current_history_search_type (void); - /** * Initialize a specific search bar */ @@ -81,11 +86,19 @@ void activateWaitingLayer(); */ void deactivateWaitingLayer(); +/** + * Set focus on addressbook search bar + */ +void set_forcus_on_addressbook_searchbar (void); + /** * Reload combo box to update list of active addressbook */ void update_searchbar_addressbook_list (void); +/** + * Create a new menu listing all system addressbooks + */ GtkWidget *addressbook_menu_new (void); #endif diff --git a/sflphone-client-gnome/src/mainwindow.h b/sflphone-client-gnome/src/mainwindow.h index 83abd42e38b68da3232babe3fc4b6584fc1a0868..17b30b44af015987a57fb8555ed5ac48c71778fa 100644 --- a/sflphone-client-gnome/src/mainwindow.h +++ b/sflphone-client-gnome/src/mainwindow.h @@ -112,12 +112,6 @@ void statusbar_pop_message (guint id); */ void statusbar_update_clock (gchar *time); - -//static gboolean -//on_key_released (GtkWidget *widget, GdkEventKey *event, -// gpointer user_data); -// void set_focus_on_mainwindow(); - gboolean focus_is_on_calltree; gboolean focus_is_on_searchbar;