# HG changeset patch # User Eric Warmenhoven # Date 980733457 0 # Node ID 2f4e6269b001b0f51171c7db4eb4b2c8a760e056 # Parent 5c67b8794991e308ddbb9e38e7860c89338abb92 [gaim-migrate @ 1452] option to bind ctl-enter to send committer: Tailor Script diff -r 5c67b8794991 -r 2f4e6269b001 src/conversation.c --- a/src/conversation.c Mon Jan 29 01:19:24 2001 +0000 +++ b/src/conversation.c Mon Jan 29 01:57:37 2001 +0000 @@ -471,10 +471,11 @@ close_callback(c->window, c); } } else if (event->keyval == GDK_Return) { - if (!(event->state & GDK_SHIFT_MASK) - && (general_options & OPT_GEN_ENTER_SENDS)) { + if ((event->state & GDK_CONTROL_MASK) && (general_options & OPT_GEN_CTL_ENTER)) { gtk_signal_emit_by_name(GTK_OBJECT(entry), "activate", c); - //to stop the putting in of the enter character + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + } else if (!(event->state & GDK_SHIFT_MASK) && (general_options & OPT_GEN_ENTER_SENDS)) { + gtk_signal_emit_by_name(GTK_OBJECT(entry), "activate", c); gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); } else { gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); diff -r 5c67b8794991 -r 2f4e6269b001 src/gaim.h --- a/src/gaim.h Mon Jan 29 01:19:24 2001 +0000 +++ b/src/gaim.h Mon Jan 29 01:57:37 2001 +0000 @@ -462,8 +462,9 @@ #define OPT_GEN_TIK_HACK 0x00100000 #define OPT_GEN_CTL_SMILEYS 0x00200000 /* #define OPT_GEN_KEEPALIVE 0x00400000 now OPT_USR_KEEPALV */ -#define OPT_GEN_AUTO_AWAY 0x00800000 +#define OPT_GEN_AUTO_AWAY 0x00800000 #define OPT_GEN_ESC_CAN_CLOSE 0x01000000 +#define OPT_GEN_CTL_ENTER 0x02000000 extern int display_options; #define OPT_DISP_SHOW_TIME 0x00000001 diff -r 5c67b8794991 -r 2f4e6269b001 src/prefs.c --- a/src/prefs.c Mon Jan 29 01:19:24 2001 +0000 +++ b/src/prefs.c Mon Jan 29 01:57:37 2001 +0000 @@ -241,6 +241,7 @@ gtk_widget_show(label); gaim_button(_("Enter sends message"), &general_options, OPT_GEN_ENTER_SENDS, box); + gaim_button(_("Control-Enter sends message"), &general_options, OPT_GEN_CTL_ENTER, 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); @@ -1895,7 +1896,7 @@ gtk_widget_realize(prefs); aol_icon(prefs->window); gtk_window_set_title(GTK_WINDOW(prefs), _("Gaim - Preferences")); - gtk_widget_set_usize(prefs, 690, 540); + gtk_widget_set_usize(prefs, 690, 600); gtk_signal_connect(GTK_OBJECT(prefs), "destroy", GTK_SIGNAL_FUNC(delete_prefs), NULL); vbox = gtk_vbox_new(FALSE, 5);