changeset 17803:e83972691531

Fix #1284. "Pressing Ctrl+C while editing a buddy list alias shouldn't "Join a chat""
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 25 May 2007 22:45:43 +0000
parents 5d4a8b5f9ba3
children 464840043c66
files pidgin/gtkblist.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Fri May 25 22:06:53 2007 +0000
+++ b/pidgin/gtkblist.c	Fri May 25 22:45:43 2007 +0000
@@ -3820,15 +3820,17 @@
 static gboolean
 gtk_blist_window_key_press_cb(GtkWidget *w, GdkEventKey *event, PidginBuddyList *gtkblist)
 {
-	GtkWidget *imhtml;
+	GtkWidget *widget;
 
 	if (!gtkblist)
 		return FALSE;
 
-	imhtml = gtk_window_get_focus(GTK_WINDOW(gtkblist->window));
-
-	if (GTK_IS_IMHTML(imhtml) && gtk_bindings_activate(GTK_OBJECT(imhtml), event->keyval, event->state))
-		return TRUE;
+	widget = gtk_window_get_focus(GTK_WINDOW(gtkblist->window));
+
+	if (GTK_IS_IMHTML(widget) || GTK_IS_ENTRY(widget)) {
+		if (gtk_bindings_activate(GTK_OBJECT(widget), event->keyval, event->state))
+			return TRUE;
+	}
 	return FALSE;
 }