From 87c61411fad4f9f2b14513b3642b5d9a82932703 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 14 Mar 2002 19:18:39 +0000 Subject: Don't search if any modifier but SHIFT or LOCK is pressed. * e-tree.c (item_key_press): Don't search if any modifier but SHIFT or LOCK is pressed. * e-table.c (group_key_press): Don't search if any modifier but SHIFT or LOCK is pressed. svn path=/trunk/; revision=16161 --- widgets/table/e-table.c | 7 ++++--- widgets/table/e-tree.c | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'widgets/table') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index a12350da1f..50d0d12e3b 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -757,9 +757,10 @@ group_key_press (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et e_table_search_backspace (et->search); break; default: - if ((key->keyval >= GDK_a && key->keyval <= GDK_z) || - (key->keyval >= GDK_A && key->keyval <= GDK_Z) || - (key->keyval >= GDK_0 && key->keyval <= GDK_9)) { + if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_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))) { e_table_search_input_character (et->search, key->keyval); } gtk_signal_emit (GTK_OBJECT (et), diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index aee7061f7a..38133b7e56 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -861,7 +861,8 @@ item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) e_table_search_backspace (et->priv->search); break; default: - if ((key->keyval >= GDK_a && key->keyval <= GDK_z) || + if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_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)) { e_table_search_input_character (et->priv->search, key->keyval); -- cgit v1.2.3