# HG changeset patch # User Richard Laager # Date 1183252090 0 # Node ID 0ef0b2ead713f200d57fef8bafbe0d69fbf80715 # Parent ec29522b76d004ca7dcc775ebb158c27bac0df77 Rework the smiley dialog close logic: Escape will always close the window. Clicking in the dialog will close it IFF it's showing the error message for the "none" theme. This was necessary because otherwise clicking on empty space in the window could close it, which would be confusing if you just missed a smiley. Fixes #1299 diff -r ec29522b76d0 -r 0ef0b2ead713 pidgin/gtkimhtmltoolbar.c --- a/pidgin/gtkimhtmltoolbar.c Sun Jul 01 00:59:35 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.c Sun Jul 01 01:08:10 2007 +0000 @@ -733,14 +733,16 @@ free(it_tmp); } gtk_box_pack_start(GTK_BOX(smiley_table), line, FALSE, TRUE, 0); + + gtk_widget_add_events(dialog, GDK_KEY_PRESS_MASK); } else { smiley_table = gtk_label_new(_("This theme has no available smileys.")); + gtk_widget_add_events(dialog, GDK_KEY_PRESS_MASK | GDK_BUTTON_PRESS_MASK); + g_signal_connect(G_OBJECT(dialog), "button-press-event", (GCallback)smiley_dialog_input_cb, toolbar); } - gtk_widget_add_events(dialog, GDK_KEY_PRESS_MASK | GDK_BUTTON_PRESS_MASK); g_signal_connect(G_OBJECT(dialog), "key-press-event", (GCallback)smiley_dialog_input_cb, toolbar); - g_signal_connect(G_OBJECT(dialog), "button-press-event", (GCallback)smiley_dialog_input_cb, toolbar); gtk_container_add(GTK_CONTAINER(dialog), smiley_table); gtk_widget_show(smiley_table);