changeset 12461:27671f780081

[gaim-migrate @ 14771] SF Patch #1378050 from Sadrul "This patch makes formatting shortcuts (like ctrl+b/i/u work in the statusbox-imhtml)." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 12 Dec 2005 07:22:41 +0000
parents 3d999a4d4892
children 398bdfe07c57
files src/gtkblist.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Mon Dec 12 07:20:31 2005 +0000
+++ b/src/gtkblist.c	Mon Dec 12 07:22:41 2005 +0000
@@ -3428,6 +3428,21 @@
 	return FALSE;
 }
 
+static gboolean
+gtk_blist_window_key_press_cb(GtkWidget *w, GdkEventKey *event, GaimGtkBuddyList *gtkblist)
+{
+	GtkWidget *imhtml;
+
+	if (!gtkblist)
+		return FALSE;
+
+	imhtml = gtk_window_get_focus(GTK_WINDOW(gtkblist->window));
+
+	if (GTK_IS_IMHTML(imhtml) && gtk_bindings_activate_event(GTK_OBJECT(imhtml), event))
+		return TRUE;
+	return FALSE;
+}
+
 static void gaim_gtk_blist_show(GaimBuddyList *list)
 {
 	void *handle;
@@ -3466,6 +3481,7 @@
 	g_signal_connect(G_OBJECT(gtkblist->window), "configure_event", G_CALLBACK(gtk_blist_configure_cb), NULL);
 	g_signal_connect(G_OBJECT(gtkblist->window), "visibility_notify_event", G_CALLBACK(gtk_blist_visibility_cb), NULL);
 	g_signal_connect(G_OBJECT(gtkblist->window), "window_state_event", G_CALLBACK(gtk_blist_window_state_cb), NULL);
+	g_signal_connect(G_OBJECT(gtkblist->window), "key_press_event", G_CALLBACK(gtk_blist_window_key_press_cb), gtkblist);
 	gtk_widget_add_events(gtkblist->window, GDK_VISIBILITY_NOTIFY_MASK);
 
 	/******************************* Menu bar *************************************/