aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-02-01 16:45:38 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-02-01 16:45:38 +0800
commit02569a3314f50eaa36176a3a2c85859f06d90269 (patch)
tree2d2509b89b7e08d93a9f94a3d5236aeb221c95e7
parent6329b4efa1b3a45d3ce1d602efe6a16090c1ab9c (diff)
downloadgsoc2013-evolution-02569a3314f50eaa36176a3a2c85859f06d90269.tar
gsoc2013-evolution-02569a3314f50eaa36176a3a2c85859f06d90269.tar.gz
gsoc2013-evolution-02569a3314f50eaa36176a3a2c85859f06d90269.tar.bz2
gsoc2013-evolution-02569a3314f50eaa36176a3a2c85859f06d90269.tar.lz
gsoc2013-evolution-02569a3314f50eaa36176a3a2c85859f06d90269.tar.xz
gsoc2013-evolution-02569a3314f50eaa36176a3a2c85859f06d90269.tar.zst
gsoc2013-evolution-02569a3314f50eaa36176a3a2c85859f06d90269.zip
** Fix for bug #512623
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. svn path=/trunk/; revision=34944
-rw-r--r--widgets/table/ChangeLog8
-rw-r--r--widgets/table/e-table.c2
-rw-r--r--widgets/table/e-tree.c12
3 files changed, 16 insertions, 6 deletions
diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog
index 71e12de88e..f5c3455ba8 100644
--- a/widgets/table/ChangeLog
+++ b/widgets/table/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
2008-01-28 Srinivasa Ragavan <sragavan@novell.com>
* e-table-item.c: (eti_draw): Fix some gradient issues.
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index a6adf312cf..3612191e6a 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -835,7 +835,7 @@ group_key_press (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et
/* 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)))
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 2c5f991bdc..7617f25f05 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -885,11 +885,12 @@ item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
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 @@ item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
}
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 @@ item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
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))) {