From ef9238e9cc2d2cd2f7b80fc4afe583e38d4914c7 Mon Sep 17 00:00:00 2001
From: Christopher James Lahey <clahey@helixcode.com>
Date: Mon, 24 Apr 2000 13:36:11 +0000
Subject: Made the tooltip show up in the correct place and configuration when
 using

2000-04-24  Christopher James Lahey  <clahey@helixcode.com>

	* widgets/e-text/e-text.c: Made the tooltip show up in the correct
	place and configuration when using the "max_lines", "anchor"
	(untested), or "justification" arguments.

From a patch by Iain Holmes <ih@csd.abdn.ac.uk>

	* widgets/e-text/e-text-event-processor-emacs-like.c,
	widget/e-text/e-text-event-processor-types.h,
	widgets/e-text/e-text.c, widgets/e-text/e-text.h: Changed C-w and
	C-y to control the X clipboard.  Added double and triple click
	events.

From widgets/e-table/:

2000-04-24  Christopher James Lahey  <clahey@helixcode.com>

	* e-table.c: Fixed some warnings.

svn path=/trunk/; revision=2581
---
 e-util/e-text-event-processor-emacs-like.c | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

(limited to 'e-util/e-text-event-processor-emacs-like.c')

diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
index 41bcd0c31d..be323d028f 100644
--- a/e-util/e-text-event-processor-emacs-like.c
+++ b/e-util/e-text-event-processor-emacs-like.c
@@ -56,9 +56,9 @@ static const ETextEventProcessorCommand control_keys[26] =
 	{ E_TEP_SELECTION, E_TEP_NOP, 0, "" },           /* t */
 	{ E_TEP_START_OF_LINE,      E_TEP_DELETE, 0, "" }, /* u */
 	{ E_TEP_SELECTION,          E_TEP_PASTE, 0, "" }, /* v */
-	{ E_TEP_BACKWARD_WORD,      E_TEP_DELETE, 0, "" }, /* w */
+	{ E_TEP_SELECTION,          E_TEP_DELETE, 0, "" }, /* w */
 	{ E_TEP_SELECTION,          E_TEP_DELETE, 0, "" }, /* x */
-	{ E_TEP_SELECTION, E_TEP_NOP, 0, "" },           /* y */
+	{ E_TEP_SELECTION,          E_TEP_PASTE, 0, "" }, /* y */
 	{ E_TEP_SELECTION, E_TEP_NOP, 0, "" }           /* z */
 };
 
@@ -159,6 +159,20 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
 			tep_el->mouse_down = TRUE;
 		}
 		break;
+	case GDK_2BUTTON_PRESS:
+		if (event->button.button == 1) {
+			command.action = E_TEP_SELECT;
+			command.position = E_TEP_SELECT_WORD;
+			command.time = event->button.time;
+		}
+		break;
+	case GDK_3BUTTON_PRESS:
+		if (event->button.button == 1) {
+			command.action = E_TEP_SELECT;
+			command.position = E_TEP_SELECT_ALL;
+			command.time = event->button.time;
+		}
+		break;
 	case GDK_BUTTON_RELEASE:
 		if (event->button.button == 1) {
 			command.action = E_TEP_UNGRAB;
@@ -166,6 +180,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
 			gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
 			command.time = event->button.time;
 			tep_el->mouse_down = FALSE;
+			command.action = E_TEP_NOP;
 		} else if (event->button.button == 2) {
 			command.action = E_TEP_MOVE;
 			command.position = E_TEP_VALUE;
@@ -299,7 +314,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
 						command.string = control_keys[(int) (key.keyval - 'a')].string;
 					}
 
-					if (key.keyval == 'x') {
+					if (key.keyval == 'x' || key.keyval == 'w') {
 						command.action = E_TEP_COPY;
 						command.position = E_TEP_SELECTION;
 						gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
-- 
cgit