changeset 17820:192a86dfade8

Handle key presses in the topic entry area in chats so Alt-# etc. works for switching conversations when the topic entry area has focus.
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 10 Jun 2007 18:27:11 +0000
parents 17f798ec0a2f
children 9fafe265567f
files pidgin/gtkconv.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Sun Jun 10 17:33:36 2007 +0000
+++ b/pidgin/gtkconv.c	Sun Jun 10 18:27:11 2007 +0000
@@ -1856,6 +1856,9 @@
 				if (!gtkconv->send_history)
 					break;
 
+				if (gtkconv->entry != entry)
+					break;
+
 				if (!gtkconv->send_history->prev) {
 					GtkTextIter start, end;
 
@@ -1904,6 +1907,9 @@
 				if (!gtkconv->send_history)
 					break;
 
+				if (gtkconv->entry != entry)
+					break;
+
 				if (gtkconv->send_history->prev && gtkconv->send_history->prev->data) {
 					GObject *object;
 					GtkTextIter iter;
@@ -2007,6 +2013,8 @@
 		switch (event->keyval)
 		{
 			case GDK_Tab:
+				if (gtkconv->entry != entry)
+					break;
 				return tab_complete(conv);
 				break;
 
@@ -4254,6 +4262,8 @@
 
 		gtk_box_pack_start(GTK_BOX(hbox), gtkchat->topic_text, TRUE, TRUE, 0);
 		gtk_widget_show(gtkchat->topic_text);
+		g_signal_connect(G_OBJECT(gtkchat->topic_text), "key_press_event",
+			             G_CALLBACK(entry_key_press_cb), gtkconv);
 	}
 
 	/* Setup the horizontal pane. */