evolution r34944 - trunk/widgets/table



Author: mcrha
Date: Fri Feb  1 08:45:38 2008
New Revision: 34944
URL: http://svn.gnome.org/viewvc/evolution?rev=34944&view=rev

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

	** Fix for bug #512623

	* e-tree.c: (item_key_press):
	Check only if Ctrl/Alt/Shift is pressed when required Shift only.
	* e-table.c: (group_key_press): Ignore/consider GDK_MODEx_MASK states.



Modified:
   trunk/widgets/table/ChangeLog
   trunk/widgets/table/e-table.c
   trunk/widgets/table/e-tree.c

Modified: trunk/widgets/table/e-table.c
==============================================================================
--- trunk/widgets/table/e-table.c	(original)
+++ trunk/widgets/table/e-table.c	Fri Feb  1 08:45:38 2008
@@ -835,7 +835,7 @@
 		/* Fall through */
 	default:
 		init_search (et);
-		if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK)) == 0
+		if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_MOD1_MASK | GDK_MOD2_MASK | GDK_MOD3_MASK | GDK_MOD4_MASK | GDK_MOD5_MASK)) == 0
 		    && ((key->keyval >= GDK_a && key->keyval <= GDK_z) ||
 			(key->keyval >= GDK_A && key->keyval <= GDK_Z) ||
 			(key->keyval >= GDK_0 && key->keyval <= GDK_9)))

Modified: trunk/widgets/table/e-tree.c
==============================================================================
--- trunk/widgets/table/e-tree.c	(original)
+++ trunk/widgets/table/e-tree.c	Fri Feb  1 08:45:38 2008
@@ -885,11 +885,12 @@
 
 		return_val = 1;
 		break;
-	case '=':
+	case GDK_plus:
+	case GDK_KP_Add:
 	case GDK_Right:
 	case GDK_KP_Right:
 		/* Only allow if the Shift modifier is used -- eg. Ctrl-Equal shouldn't be handled.  */
-		if ((key->state == 0) || (key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK)))
+		if ((key->state & (GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_MOD1_MASK)) != GDK_SHIFT_MASK)
 			break;
 		if (row != -1) {
 			path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
@@ -898,11 +899,12 @@
 		}
 		return_val = 1;
 		break;
-	case '-':
+	case GDK_underscore:
+	case GDK_KP_Subtract:
 	case GDK_Left:
 	case GDK_KP_Left:
 		/* Only allow if the Shift modifier is used -- eg. Ctrl-Minus shouldn't be handled.  */
-		if ((key->state == 0) || (key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK)))
+		if ((key->state & (GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_MOD1_MASK)) != GDK_SHIFT_MASK)
 			break;
 		if (row != -1) {
 			path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
@@ -916,7 +918,7 @@
 			return TRUE;
 		/* Fallthrough */
 	default:
-		if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK)) == 0
+		if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK | GDK_MOD1_MASK | GDK_MOD2_MASK | GDK_MOD3_MASK | GDK_MOD4_MASK | GDK_MOD5_MASK)) == 0
 		    && ((key->keyval >= GDK_a && key->keyval <= GDK_z) ||
 			(key->keyval >= GDK_A && key->keyval <= GDK_Z) ||
 			(key->keyval >= GDK_0 && key->keyval <= GDK_9))) {



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