evolution r35055 - in trunk: e-util widgets/table



Author: mcrha
Date: Tue Feb 19 19:05:09 2008
New Revision: 35055
URL: http://svn.gnome.org/viewvc/evolution?rev=35055&view=rev

Log:
2008-02-19  Milan Crha  <mcrha redhat com>

	** Fix for bug #209353

	* e-util/e-text-event-processor-emacs-like.c:
	(e_text_event_processor_emacs_like_event):
	Allow paste text on mouse middle button click.

	* widgets/table/e-table-item.c: (eti_event):
	Pass Home/End keys to cell when editing.



Modified:
   trunk/e-util/ChangeLog
   trunk/e-util/e-text-event-processor-emacs-like.c
   trunk/widgets/table/ChangeLog
   trunk/widgets/table/e-table-item.c

Modified: trunk/e-util/e-text-event-processor-emacs-like.c
==============================================================================
--- trunk/e-util/e-text-event-processor-emacs-like.c	(original)
+++ trunk/e-util/e-text-event-processor-emacs-like.c	Tue Feb 19 19:05:09 2008
@@ -131,18 +131,18 @@
 	 */
 	switch (event->type) {
 	case GDK_BUTTON_PRESS:
-		if (event->button.button == 1) {
+		if (event->button.button == 1 || event->button.button == 2) {
 			command.action = E_TEP_GRAB;
 			command.time = event->button.time;
 			g_signal_emit_by_name (tep, "command", &command);
-			if (event->button.state & GDK_SHIFT_MASK)
+			if (event->button.button == 1 && event->button.state & GDK_SHIFT_MASK)
 				command.action = E_TEP_SELECT;
 			else
 				command.action = E_TEP_MOVE;
 			command.position = E_TEP_VALUE;
 			command.value = event->button.position;
 			command.time = event->button.time;
-			tep_el->mouse_down = TRUE;
+			tep_el->mouse_down = event->button.button == 1;
 		}
 		break;
 	case GDK_2BUTTON_PRESS:

Modified: trunk/widgets/table/e-table-item.c
==============================================================================
--- trunk/widgets/table/e-table-item.c	(original)
+++ trunk/widgets/table/e-table-item.c	Tue Feb 19 19:05:09 2008
@@ -2701,7 +2701,6 @@
 				break;
 			}
 
-
 			g_signal_emit (eti, eti_signals [KEY_PRESS], 0,
 				       model_to_view_row(eti, cursor_row), cursor_col, e, &return_val);
 			if ((!return_val) &&
@@ -2743,6 +2742,11 @@
 			break;
 		case GDK_Home:
 		case GDK_KP_Home:
+			if (eti_editing (eti)) {
+				handled = FALSE;
+				break;
+			}
+
 			if (eti->cursor_mode != E_CURSOR_LINE) {
 				eti_cursor_move (eti, model_to_view_row(eti, cursor_row), 0);
 				return_val = TRUE;
@@ -2751,6 +2755,11 @@
 			break;
 		case GDK_End:
 		case GDK_KP_End:
+			if (eti_editing (eti)) {
+				handled = FALSE;
+				break;
+			}
+
 			if (eti->cursor_mode != E_CURSOR_LINE) {
 				eti_cursor_move (eti, model_to_view_row(eti, cursor_row), eti->cols - 1);
 				return_val = TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]