Mercurial > pidgin.yaz
changeset 1411:a3e472534370
[gaim-migrate @ 1421]
can close windows by hitting 'esc'
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 16 Jan 2001 02:20:08 +0000 |
parents | 6b083d580184 |
children | 47413c49bbee |
files | ChangeLog src/conversation.c src/gaim.h src/prefs.c |
diffstat | 4 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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);
--- 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
--- 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);