aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-click-to-add.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-18 06:39:59 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-18 06:39:59 +0800
commitafe6f502c326350cc31d34646d5000a964321525 (patch)
tree9d9469a0ce33428e24e602fdbf87bc496864bc57 /widgets/table/e-table-click-to-add.c
parentb79bf3d187cabd11df74d2e6e414e41ae637f307 (diff)
downloadgsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.tar.gz
gsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.tar.zst
gsoc2013-evolution-afe6f502c326350cc31d34646d5000a964321525.zip
Use new GDK keysym names if available.
In GTK+ 2.21.8, the keysym names were renamed from GDK_* to GDK_KEY_*. I've added backward-compatibility macors to gtk-compat.h, which can be dumped as soon as we require GTK+ >= 2.22.0.
Diffstat (limited to 'widgets/table/e-table-click-to-add.c')
-rw-r--r--widgets/table/e-table-click-to-add.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 3d5a374382..ca564cbbcd 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -41,6 +41,9 @@
#include "e-table-header.h"
#include "e-table-one.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
enum {
CURSOR_CHANGE,
STYLE_SET,
@@ -330,10 +333,10 @@ item_key_press (ETableItem *item,
ETableClickToAdd *etcta)
{
switch (event->key.keyval) {
- case GDK_Return:
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
- case GDK_3270_Enter:
+ case GDK_KEY_Return:
+ case GDK_KEY_KP_Enter:
+ case GDK_KEY_ISO_Enter:
+ case GDK_KEY_3270_Enter:
finish_editing (etcta);
return TRUE;
}
@@ -436,14 +439,14 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_KEY_PRESS:
switch (e->key.keyval) {
- case GDK_Tab:
- case GDK_KP_Tab:
- case GDK_ISO_Left_Tab:
+ case GDK_KEY_Tab:
+ case GDK_KEY_KP_Tab:
+ case GDK_KEY_ISO_Left_Tab:
finish_editing (etcta);
break;
default:
return FALSE;
- case GDK_Escape:
+ case GDK_KEY_Escape:
if (etcta->row) {
e_table_item_leave_edit (E_TABLE_ITEM (etcta->row));
etcta_drop_one (etcta);