# HG changeset patch # User Eric Warmenhoven # Date 979611608 0 # Node ID a3e472534370f598e8760a78bde595e4fb30b487 # Parent 6b083d580184ebd58b94f25b7170a05672e06e9a [gaim-migrate @ 1421] can close windows by hitting 'esc' committer: Tailor Script diff -r 6b083d580184 -r a3e472534370 ChangeLog --- a/ChangeLog Tue Jan 16 02:06:46 2001 +0000 +++ b/ChangeLog Tue Jan 16 02:20:08 2001 +0000 @@ -9,6 +9,7 @@ * Ability to independently set accounts as away * Can use all away states for ICQ, Yahoo (N/A, Be Right Back, etc.) * Fixed hanging trees + * Can close windows by hitting 'Esc' (optional) version 0.11.0-pre4: * ICQ upgraded to use icqlib 1.1.0 diff -r 6b083d580184 -r a3e472534370 src/conversation.c --- a/src/conversation.c Tue Jan 16 02:06:46 2001 +0000 +++ b/src/conversation.c Tue Jan 16 02:20:08 2001 +0000 @@ -480,7 +480,12 @@ gboolean keypress_callback(GtkWidget *entry, GdkEventKey * event, struct conversation *c) { int pos; - if (event->keyval == GDK_Return) { + if (event->keyval == GDK_Escape) { + if (general_options & OPT_GEN_ESC_CAN_CLOSE) { + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + gtk_widget_destroy(c->window); + } + } else if (event->keyval == GDK_Return) { if (!(event->state & GDK_SHIFT_MASK) && (general_options & OPT_GEN_ENTER_SENDS)) { gtk_signal_emit_by_name(GTK_OBJECT(entry), "activate", c); diff -r 6b083d580184 -r a3e472534370 src/gaim.h --- a/src/gaim.h Tue Jan 16 02:06:46 2001 +0000 +++ b/src/gaim.h Tue Jan 16 02:20:08 2001 +0000 @@ -460,6 +460,7 @@ #define OPT_GEN_CTL_SMILEYS 0x00200000 /* #define OPT_GEN_KEEPALIVE 0x00400000 now OPT_USR_KEEPALV */ #define OPT_GEN_AUTO_AWAY 0x00800000 +#define OPT_GEN_ESC_CAN_CLOSE 0x01000000 extern int display_options; #define OPT_DISP_SHOW_TIME 0x00000001 diff -r 6b083d580184 -r a3e472534370 src/prefs.c --- a/src/prefs.c Tue Jan 16 02:06:46 2001 +0000 +++ b/src/prefs.c Tue Jan 16 02:20:08 2001 +0000 @@ -241,6 +241,7 @@ gtk_widget_show(label); gaim_button(_("Enter sends message"), &general_options, OPT_GEN_ENTER_SENDS, box); + gaim_button(_("Escape closes window"), &general_options, OPT_GEN_ESC_CAN_CLOSE, box); gaim_button(_("Control-{B/I/U/S} inserts HTML tags"), &general_options, OPT_GEN_CTL_CHARS, box); gaim_button(_("Control-(number) inserts smileys"), &general_options, OPT_GEN_CTL_SMILEYS, box);