mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 08:39:20 +00:00
chat tab takes focus in text entry
This commit is contained in:
parent
9f9602e728
commit
7b9cb2b8cc
2 changed files with 14 additions and 8 deletions
|
|
@ -187,6 +187,11 @@ void linphone_gtk_update_chat_picture(gboolean active){
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean grab_focus(GtkWidget *w){
|
||||
gtk_widget_grab_focus(w);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void linphone_gtk_chat_selected(GtkWidget *item){
|
||||
GtkWidget *w=gtk_widget_get_toplevel(item);
|
||||
GtkTreeSelection *select;
|
||||
|
|
@ -211,15 +216,16 @@ void linphone_gtk_chat_selected(GtkWidget *item){
|
|||
gtk_list_store_set(store,&iter, FRIEND_CHATROOM,cr,-1);
|
||||
gtk_list_store_set(store,&iter, FRIEND_CHAT_CONVERSATION,NULL,-1);
|
||||
}
|
||||
page=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
|
||||
if(page==NULL){
|
||||
page=linphone_gtk_init_chatroom(cr,uri);
|
||||
g_object_set_data(G_OBJECT(friendlist),"chatview",(gpointer)page);
|
||||
} else {
|
||||
linphone_gtk_load_chatroom(cr,uri,page);
|
||||
}
|
||||
page=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
|
||||
if(page==NULL){
|
||||
page=linphone_gtk_init_chatroom(cr,uri);
|
||||
g_object_set_data(G_OBJECT(friendlist),"chatview",(gpointer)page);
|
||||
} else {
|
||||
linphone_gtk_load_chatroom(cr,uri,page);
|
||||
}
|
||||
gtk_notebook_set_current_page(notebook,gtk_notebook_page_num(notebook,page));
|
||||
linphone_gtk_update_chat_picture(FALSE);
|
||||
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(page,"text_entry"));
|
||||
gtk_list_store_set(store,&iter,FRIEND_CHAT,create_active_chat_picture(),-1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit f7e6ccfbeacbde0cc6d286b35ab92a785fd08861
|
||||
Subproject commit 256e4eca87c06865d0ff186d05b4ca03f9394701
|
||||
Loading…
Add table
Reference in a new issue