Mercurial > pidgin.yaz
changeset 9080:717d0e23f5fa
[gaim-migrate @ 9856]
Make the focus chain for conversations awesome.
Unfortunately it's not usable because every time something in the
gtkconv gets a "focus" signal we switch focus back to the entry
widget. We need a better way to give the entry widget focus when
initially switching to a tab, but not any time after that.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 27 May 2004 03:34:52 +0000 |
parents | 67e20c25d41e |
children | 68712f777fa4 |
files | src/gtkconv.c |
diffstat | 1 files changed, 20 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkconv.c Thu May 27 02:47:39 2004 +0000 +++ b/src/gtkconv.c Thu May 27 03:34:52 2004 +0000 @@ -3539,7 +3539,7 @@ GtkListStore *ls; GtkCellRenderer *rend; GtkTreeViewColumn *col; - GList *focus_chain; + GList *focus_chain = NULL; gtkconv = GAIM_GTK_CONVERSATION(conv); gtkchat = gtkconv->u.chat; @@ -3781,8 +3781,15 @@ setup_chat_buttons(conv, gtkconv->bbox); - focus_chain = g_list_prepend (NULL, sw); - gtk_container_set_focus_chain (GTK_CONTAINER(vbox), focus_chain); + /* + * Focus for chat windows should be as follows: + * Tab title -> chat topic -> conversation scrollback -> user list -> + * user list buttons -> entry -> buttons at bottom + */ + focus_chain = g_list_prepend(focus_chain, gtkconv->bbox); + focus_chain = g_list_prepend(focus_chain, gtkconv->entrybox); + gtk_container_set_focus_chain(GTK_CONTAINER(vbox), focus_chain); + return vpaned; } @@ -3796,7 +3803,7 @@ GtkWidget *vbox; GtkWidget *vbox2; GtkWidget *sw; - GList *focus_chain; + GList *focus_chain = NULL; gtkconv = GAIM_GTK_CONVERSATION(conv); gtkim = gtkconv->u.im; @@ -3919,8 +3926,13 @@ setup_im_buttons(conv, gtkconv->bbox); gtkconv->u.im->animate = gaim_prefs_get_bool("/gaim/gtk/conversations/im/animate_buddy_icons"); - focus_chain = g_list_prepend (NULL, sw); - gtk_container_set_focus_chain (GTK_CONTAINER(vbox2), focus_chain); + /* + * Focus for IM windows should be as follows: + * Tab title -> conversation scrollback -> entry -> buttons at bottom + */ + focus_chain = g_list_prepend(focus_chain, gtkconv->bbox); + focus_chain = g_list_prepend(focus_chain, gtkconv->entrybox); + gtk_container_set_focus_chain(GTK_CONTAINER(vbox2), focus_chain); return paned; } @@ -4234,8 +4246,8 @@ gtk_widget_show(gtkconv->toolbar); g_signal_connect_swapped(G_OBJECT(pane), "focus", - G_CALLBACK(gtk_widget_grab_focus), - gtkconv->entry); + G_CALLBACK(gtk_widget_grab_focus), + gtkconv->entry); } gtkconv->tabby = tabby = gtk_hbox_new(FALSE, 6);