Mercurial > pidgin
changeset 18389:0ef0b2ead713
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
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 01 Jul 2007 01:08:10 +0000 |
parents | ec29522b76d0 |
children | b1fc539eb390 |
files | pidgin/gtkimhtmltoolbar.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);