# HG changeset patch # User Mark Doliner # Date 1075260759 0 # Node ID 62936f62d98e55a8bf09120530d14da2417296d2 # Parent e68b1486c7adf01f7588ec5de2bcf5b8f36ead86 [gaim-migrate @ 8887] Want-to-be-Gaim Hackers: Please fix this the correct way (by making sure the entry actually does get focus when changing tabs) and submit a patch! See recipe #134 for more fun with garlic and squash! committer: Tailor Script diff -r e68b1486c7ad -r 62936f62d98e src/gtkconv.c --- a/src/gtkconv.c Tue Jan 27 18:50:23 2004 +0000 +++ b/src/gtkconv.c Wed Jan 28 03:32:39 2004 +0000 @@ -1629,6 +1629,12 @@ return FALSE; } +/* + * If someone tries to type into the conversation backlog of a + * conversation window then we yank focus from the conversation backlog + * and give it to the text entry box so that people can type + * all the live long day and it will get entered into the entry box. + */ static gboolean refocus_entry_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) { @@ -3672,6 +3678,16 @@ gtk_box_pack_start(GTK_BOX(hbox), gtkchat->topic_text, TRUE, TRUE, 5); gtk_widget_show(gtkchat->topic_text); + + /* + * We probably shouldn't need this. When switching tabs to a chat + * window focus is supposed to go to the entry box, but for some + * reason it's going to the topic entry box. + */ + g_signal_connect(G_OBJECT(gtkchat->topic_text), "key_press_event", + G_CALLBACK(refocus_entry_cb), gtkconv); + g_signal_connect(G_OBJECT(gtkchat->topic_text), "key_release_event", + G_CALLBACK(refocus_entry_cb), gtkconv); } /* Setup the horizontal pane. */