changeset 1442:2f4e6269b001

[gaim-migrate @ 1452] option to bind ctl-enter to send committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 29 Jan 2001 01:57:37 +0000
parents 5c67b8794991
children 336fc98b7f90
files src/conversation.c src/gaim.h src/prefs.c
diffstat 3 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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");
--- 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
--- 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);