changeset 8173:62936f62d98e

[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 <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 28 Jan 2004 03:32:39 +0000
parents e68b1486c7ad
children 4c34db6996d1
files src/gtkconv.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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. */