[gnumeric] compilation: dead kittens for GDK_KEY_*



commit abb1f95ee100433069725e6ddec21c34fcf4eba0
Author: Morten Welinder <terra gnome org>
Date:   Wed Apr 13 11:18:35 2011 -0400

    compilation: dead kittens for GDK_KEY_*

 plugins/python-loader/py-command-line.c |    6 +-
 plugins/python-loader/py-console.c      |    2 +-
 src/dead-kittens.h                      |    4 +
 src/dialogs/dialog-cell-sort.c          |   12 ++--
 src/dialogs/dialog-stf-fixed-page.c     |   20 +++---
 src/dialogs/dialog-stf-format-page.c    |   12 ++--
 src/gnm-pane.c                          |   94 +++++++++++++++---------------
 src/gui-util.c                          |    2 +-
 src/wbc-gtk.c                           |    4 +-
 src/widgets/gnm-cell-combo-view.c       |   12 ++--
 src/widgets/gnm-notebook.c              |   52 +++++++++---------
 src/widgets/gnumeric-expr-entry.c       |   26 ++++----
 src/widgets/widget-editable-label.c     |    2 +-
 13 files changed, 126 insertions(+), 122 deletions(-)
---
diff --git a/plugins/python-loader/py-command-line.c b/plugins/python-loader/py-command-line.c
index 478adb1..94b1f77 100644
--- a/plugins/python-loader/py-command-line.c
+++ b/plugins/python-loader/py-command-line.c
@@ -52,7 +52,7 @@ static gint
 gnm_py_command_line_keypress (GnmPyCommandLine *cline, GdkEventKey *event, gpointer user_data)
 {
 	switch (event->keyval) {
-	case GDK_Return: {
+	case GDK_KEY_Return: {
 		const char *text;
 
 		text = gtk_entry_get_text (GTK_ENTRY (cline));
@@ -75,7 +75,7 @@ gnm_py_command_line_keypress (GnmPyCommandLine *cline, GdkEventKey *event, gpoin
 		cline->editing = TRUE;
 		break;
 	}
-	case GDK_Up:
+	case GDK_KEY_Up:
 		if (cline->editing) {
 			if (cline->history_tail != NULL) {
 				cline->history_cur = cline->history_tail;
@@ -94,7 +94,7 @@ gnm_py_command_line_keypress (GnmPyCommandLine *cline, GdkEventKey *event, gpoin
 			}
 		}
 		break;
-	case GDK_Down:
+	case GDK_KEY_Down:
 		if (!cline->editing) {
 			if (cline->history_cur->next != NULL) {
 				cline->history_cur = cline->history_cur->next;
diff --git a/plugins/python-loader/py-console.c b/plugins/python-loader/py-console.c
index ce2a886..8864a9a 100644
--- a/plugins/python-loader/py-console.c
+++ b/plugins/python-loader/py-console.c
@@ -54,7 +54,7 @@ cb_delete_app (GtkWidget *caller, GdkEvent *event, gpointer data)
 static gint
 cb_key_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
 {
-	if (event->keyval == GDK_w && (event->state & GDK_CONTROL_MASK)) {
+	if (event->keyval == GDK_KEY_w && (event->state & GDK_CONTROL_MASK)) {
 		g_signal_stop_emission_by_name (G_OBJECT (widget),
 						"key_press_event");
 		gtk_widget_destroy (app->win);
diff --git a/src/dead-kittens.h b/src/dead-kittens.h
index 60f4dcd..8a26d78 100644
--- a/src/dead-kittens.h
+++ b/src/dead-kittens.h
@@ -2,6 +2,7 @@
 #define GNUMERIC_GTK_DEAD_KITTENS_H
 
 #include <gutils.h>
+#include <gdk/gdkkeysyms.h>
 
 /* To be included only from C files, not headers.  */
 #ifndef HAVE_GDK_WINDOW_GET_SCREEN
@@ -17,6 +18,9 @@
 #ifndef GDK_KEY_Tab
 #define GDK_KEY_Tab GDK_Tab
 #endif
+#ifndef GDK_KEY_ISO_Left_Tab
+#define GDK_KEY_ISO_Left_Tab GDK_ISO_Left_Tab
+#endif
 #ifndef GDK_KEY_Linefeed
 #define GDK_KEY_Linefeed GDK_Linefeed
 #endif
diff --git a/src/dialogs/dialog-cell-sort.c b/src/dialogs/dialog-cell-sort.c
index f5b9d6e..785a745 100644
--- a/src/dialogs/dialog-cell-sort.c
+++ b/src/dialogs/dialog-cell-sort.c
@@ -867,12 +867,12 @@ cb_treeview_keypress (G_GNUC_UNUSED GtkWidget *w, GdkEventKey *event,
 	GtkTreeIter iter;
 
 	switch (event->keyval) {
-	case GDK_Delete:
-	case GDK_KP_Delete:
+	case GDK_KEY_Delete:
+	case GDK_KEY_KP_Delete:
 		cb_delete_clicked (w, state);
 		return TRUE;
-	case GDK_KP_Up:
-	case GDK_Up:
+	case GDK_KEY_KP_Up:
+	case GDK_KEY_Up:
 		if (ctrl) {
 			cb_up (state);
 			return TRUE;
@@ -884,8 +884,8 @@ cb_treeview_keypress (G_GNUC_UNUSED GtkWidget *w, GdkEventKey *event,
 							&iter);
 		return TRUE;
 
-	case GDK_KP_Down:
-	case GDK_Down:
+	case GDK_KEY_KP_Down:
+	case GDK_KEY_Down:
 		if (ctrl) {
 			cb_down (state);
 			return TRUE;
diff --git a/src/dialogs/dialog-stf-fixed-page.c b/src/dialogs/dialog-stf-fixed-page.c
index 09e5ccb..d70ff50 100644
--- a/src/dialogs/dialog-stf-fixed-page.c
+++ b/src/dialogs/dialog-stf-fixed-page.c
@@ -337,25 +337,25 @@ cb_col_key_press (GtkWidget *button,
 
 	if (event->type == GDK_KEY_PRESS) {
 		switch (event->keyval) {
-		case GDK_plus:
-		case GDK_KP_Add:
-		case GDK_greater:
+		case GDK_KEY_plus:
+		case GDK_KEY_KP_Add:
+		case GDK_KEY_greater:
 			widen_column (data, col, FALSE);
 			return TRUE;
 
-		case GDK_minus:
-		case GDK_KP_Subtract:
-		case GDK_less:
+		case GDK_KEY_minus:
+		case GDK_KEY_KP_Subtract:
+		case GDK_KEY_less:
 			narrow_column (data, col, FALSE);
 			return TRUE;
 
-		case GDK_Left:
-		case GDK_Up:
+		case GDK_KEY_Left:
+		case GDK_KEY_Up:
 			select_column (data, col - 1);
 			return TRUE;
 
-		case GDK_Right:
-		case GDK_Down:
+		case GDK_KEY_Right:
+		case GDK_KEY_Down:
 			select_column (data, col + 1);
 			return TRUE;
 
diff --git a/src/dialogs/dialog-stf-format-page.c b/src/dialogs/dialog-stf-format-page.c
index 01f5d58..4fb88ed 100644
--- a/src/dialogs/dialog-stf-format-page.c
+++ b/src/dialogs/dialog-stf-format-page.c
@@ -491,22 +491,22 @@ cb_treeview_key_press (GtkWidget *treeview,
 {
 	if (event->type == GDK_KEY_PRESS) {
 		switch (event->keyval) {
-		case GDK_Left:
-		case GDK_KP_Left:
+		case GDK_KEY_Left:
+		case GDK_KEY_KP_Left:
 			if (pagedata->format.index > 0)
 				activate_column (pagedata,
 						 pagedata->format.index - 1);
 			return TRUE;
 
-		case GDK_Right:
-		case GDK_KP_Right:
+		case GDK_KEY_Right:
+		case GDK_KEY_KP_Right:
 			if (pagedata->format.index + 1 < (int)pagedata->format.formats->len)
 				activate_column (pagedata,
 						 pagedata->format.index + 1);
 			return TRUE;
 
-		case GDK_space:
-		case GDK_Return: {
+		case GDK_KEY_space:
+		case GDK_KEY_Return: {
 			GtkTreeViewColumn *column = stf_preview_get_column
 				(pagedata->format.renderdata,
 				 pagedata->format.index);
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index 5bf5c4d..44e97b4 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -96,14 +96,14 @@ gnm_pane_object_key_press (GnmPane *pane, GdkEventKey *ev)
 	double   const delta = 1.0 / GOC_CANVAS (pane)->pixels_per_unit;
 
 	switch (ev->keyval) {
-	case GDK_Escape:
+	case GDK_KEY_Escape:
 		scg_mode_edit (scg);
 		gnm_app_clipboard_unant ();
 		return TRUE;
 
-	case GDK_BackSpace: /* Ick! */
-	case GDK_KP_Delete:
-	case GDK_Delete:
+	case GDK_KEY_BackSpace: /* Ick! */
+	case GDK_KEY_KP_Delete:
+	case GDK_KEY_Delete:
 		if (scg->selected_objects != NULL) {
 			cmd_objects_delete (sc->wbc,
 					    go_hash_keys (scg->selected_objects), NULL);
@@ -112,28 +112,28 @@ gnm_pane_object_key_press (GnmPane *pane, GdkEventKey *ev)
 		sc_mode_edit (sc);
 		break;
 
-	case GDK_Tab:
-	case GDK_ISO_Left_Tab:
-	case GDK_KP_Tab:
+	case GDK_KEY_Tab:
+	case GDK_KEY_ISO_Left_Tab:
+	case GDK_KEY_KP_Tab:
 		if ((scg_sheet (scg))->sheet_objects != NULL) {
 			scg_object_select_next (scg, (ev->state & GDK_SHIFT_MASK) != 0);
 			return TRUE;
 		}
 		break;
 
-	case GDK_KP_Left: case GDK_Left:
+	case GDK_KEY_KP_Left: case GDK_KEY_Left:
 		scg_objects_nudge (scg, pane, (alt ? 4 : (control ? 3 : 8)), -delta , 0, symmetric, shift);
 		gnm_pane_display_obj_size_tip (pane, NULL);
 		return TRUE;
-	case GDK_KP_Right: case GDK_Right:
+	case GDK_KEY_KP_Right: case GDK_KEY_Right:
 		scg_objects_nudge (scg, pane, (alt ? 4 : (control ? 3 : 8)), delta, 0, symmetric, shift);
 		gnm_pane_display_obj_size_tip (pane, NULL);
 		return TRUE;
-	case GDK_KP_Up: case GDK_Up:
+	case GDK_KEY_KP_Up: case GDK_KEY_Up:
 		scg_objects_nudge (scg, pane, (alt ? 6 : (control ? 1 : 8)), 0, -delta, symmetric, shift);
 		gnm_pane_display_obj_size_tip (pane, NULL);
 		return TRUE;
-	case GDK_KP_Down: case GDK_Down:
+	case GDK_KEY_KP_Down: case GDK_KEY_Down:
 		scg_objects_nudge (scg, pane, (alt ? 6 : (control ? 1 : 8)), 0, delta, symmetric, shift);
 		gnm_pane_display_obj_size_tip (pane, NULL);
 		return TRUE;
@@ -166,7 +166,7 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 	gboolean const end_mode = wbcg->last_key_was_end;
 
 	/* Update end-mode for magic end key stuff. */
-	if (event->keyval != GDK_End && event->keyval != GDK_KP_End)
+	if (event->keyval != GDK_KEY_End && event->keyval != GDK_KEY_KP_End)
 		wbcg_set_end_mode (wbcg, FALSE);
 
 	if (allow_rangesel)
@@ -179,8 +179,8 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 			: scg_cursor_move;
 
 	switch (event->keyval) {
-	case GDK_KP_Left:
-	case GDK_Left:
+	case GDK_KEY_KP_Left:
+	case GDK_KEY_Left:
 		if (event->state & GDK_MOD1_MASK)
 			return TRUE; /* Alt is used for accelerators */
 
@@ -196,8 +196,8 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 				   jump_to_bounds || end_mode, TRUE);
 		break;
 
-	case GDK_KP_Right:
-	case GDK_Right:
+	case GDK_KEY_KP_Right:
+	case GDK_KEY_Right:
 		if (event->state & GDK_MOD1_MASK)
 			return TRUE; /* Alt is used for accelerators */
 
@@ -213,8 +213,8 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 				   jump_to_bounds || end_mode, TRUE);
 		break;
 
-	case GDK_KP_Up:
-	case GDK_Up:
+	case GDK_KEY_KP_Up:
+	case GDK_KEY_Up:
 		if (event->state & SCROLL_LOCK_MASK)
 			scg_set_top_row (scg, pane->first.row - 1);
 		else if (transition_keys && jump_to_bounds) {
@@ -226,8 +226,8 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 			(*movefn) (scg, -1, jump_to_bounds || end_mode, FALSE);
 		break;
 
-	case GDK_KP_Down:
-	case GDK_Down:
+	case GDK_KEY_KP_Down:
+	case GDK_KEY_Down:
 		if (gnumeric_filter_modifiers (event->state) == GDK_MOD1_MASK) {
 			/* 1) Any in cell combos ? */
 			SheetObject *so = sv_wbv (sv)->in_cell_combo;
@@ -261,8 +261,8 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 			(*movefn) (scg, 1, jump_to_bounds || end_mode, FALSE);
 		break;
 
-	case GDK_KP_Page_Up:
-	case GDK_Page_Up:
+	case GDK_KEY_KP_Page_Up:
+	case GDK_KEY_Page_Up:
 		if ((event->state & GDK_CONTROL_MASK) != 0){
 			if ((event->state & GDK_SHIFT_MASK) != 0){
 				WorkbookSheetState * old_state = workbook_sheet_state_new(wb);
@@ -288,8 +288,8 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 		}
 		break;
 
-	case GDK_KP_Page_Down:
-	case GDK_Page_Down:
+	case GDK_KEY_KP_Page_Down:
+	case GDK_KEY_Page_Down:
 
 		if ((event->state & GDK_CONTROL_MASK) != 0){
 			if ((event->state & GDK_SHIFT_MASK) != 0){
@@ -317,8 +317,8 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 		}
 		break;
 
-	case GDK_KP_Home:
-	case GDK_Home:
+	case GDK_KEY_KP_Home:
+	case GDK_KEY_Home:
 		if (event->state & SCROLL_LOCK_MASK) {
 			scg_set_left_col (scg, sv->edit_pos.col);
 			scg_set_top_row (scg, sv->edit_pos.row);
@@ -335,8 +335,8 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 		}
 		break;
 
-	case GDK_KP_End:
-	case GDK_End:
+	case GDK_KEY_KP_End:
+	case GDK_KEY_End:
 		if (event->state & SCROLL_LOCK_MASK) {
 			int new_col = sv->edit_pos.col - (pane->last_full.col - pane->first.col);
 			int new_row = sv->edit_pos.row - (pane->last_full.row - pane->first.row);
@@ -352,8 +352,8 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 			wbcg_set_end_mode (wbcg, !end_mode);
 		break;
 
-	case GDK_KP_Insert :
-	case GDK_Insert :
+	case GDK_KEY_KP_Insert :
+	case GDK_KEY_Insert :
 		if (gnm_pane_guru_key (wbcg, event))
 			break;
 		if (state == GDK_CONTROL_MASK)
@@ -362,7 +362,7 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 			cmd_paste_to_selection (WORKBOOK_CONTROL (wbcg), sv, PASTE_DEFAULT);
 		break;
 
-	case GDK_BackSpace:
+	case GDK_KEY_BackSpace:
 		if (wbcg_is_editing (wbcg))
 			goto forward;
 		else if (!wbcg_is_editing (wbcg) && (event->state & GDK_CONTROL_MASK) != 0) {
@@ -373,8 +373,8 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 		}
 		/* Fall through */
 
-	case GDK_KP_Delete:
-	case GDK_Delete:
+	case GDK_KEY_KP_Delete:
+	case GDK_KEY_Delete:
 		if (wbcg_is_editing (wbcg)) {
 			/* stop auto-completion. then do a quick and cheesy update */
 			wbcg_auto_complete_destroy (wbcg);
@@ -398,7 +398,7 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 	 *        for tabs.
 	 */
 	case GDK_KP_Enter:
-	case GDK_Return:
+	case GDK_KEY_Return:
 		if (wbcg_is_editing (wbcg) &&
 		    (state == GDK_CONTROL_MASK ||
 		     state == (GDK_CONTROL_MASK|GDK_SHIFT_MASK) ||
@@ -409,9 +409,9 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 		is_enter = TRUE;
 		/* fall down */
 
-	case GDK_Tab:
-	case GDK_ISO_Left_Tab:
-	case GDK_KP_Tab:
+	case GDK_KEY_Tab:
+	case GDK_KEY_ISO_Left_Tab:
+	case GDK_KEY_KP_Tab:
 		if (gnm_pane_guru_key (wbcg, event))
 			break;
 
@@ -459,18 +459,18 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *event,
 		}
 		break;
 
-	case GDK_Escape:
+	case GDK_KEY_Escape:
 		wbcg_edit_finish (wbcg, WBC_EDIT_REJECT, NULL);
 		gnm_app_clipboard_unant ();
 		break;
 
-	case GDK_F4:
+	case GDK_KEY_F4:
 		if (wbcg_is_editing (wbcg))
 			return gtk_widget_event (
 				wbcg_get_entry_underlying (wbcg), (GdkEvent *) event);
 		return TRUE;
 
-	case GDK_F2:
+	case GDK_KEY_F2:
 		if (gnm_pane_guru_key (wbcg, event))
 			break;
 
@@ -575,9 +575,9 @@ gnm_pane_key_press (GtkWidget *widget, GdkEventKey *event)
 	gboolean	 allow_rangesel;
 
 	switch (event->keyval) {
-	case GDK_Shift_L:   case GDK_Shift_R:
-	case GDK_Alt_L:     case GDK_Alt_R:
-	case GDK_Control_L: case GDK_Control_R:
+	case GDK_KEY_Shift_L:   case GDK_KEY_Shift_R:
+	case GDK_KEY_Alt_L:     case GDK_KEY_Alt_R:
+	case GDK_KEY_Control_L: case GDK_KEY_Control_R:
 	return (*GTK_WIDGET_CLASS (parent_klass)->key_press_event) (widget, event);
 	}
 
@@ -597,13 +597,13 @@ gnm_pane_key_press (GtkWidget *widget, GdkEventKey *event)
 	allow_rangesel = wbcg_rangesel_possible (scg->wbcg);
 
 	/* handle ctrl/shift space before input-method filter steals it */
-	if (event->keyval == GDK_space &&
+	if (event->keyval == GDK_KEY_space &&
 	    gnm_pane_colrow_key_press (scg, event, allow_rangesel))
 		return TRUE;
 
 	pane->insert_decimal =
-		event->keyval == GDK_KP_Decimal ||
-		event->keyval == GDK_KP_Separator;
+		event->keyval == GDK_KEY_KP_Decimal ||
+		event->keyval == GDK_KEY_KP_Separator;
 
 	if (gtk_im_context_filter_keypress (pane->im_context, event))
 		return TRUE;
@@ -640,7 +640,7 @@ gnm_pane_key_release (GtkWidget *widget, GdkEventKey *event)
 	 * to displaying the edit pos.
 	 */
 	if (pane->simple.scg->selected_objects == NULL &&
-	    (event->keyval == GDK_Shift_L || event->keyval == GDK_Shift_R))
+	    (event->keyval == GDK_KEY_Shift_L || event->keyval == GDK_KEY_Shift_R))
 		wb_view_selection_desc (wb_control_view (sc->wbc), TRUE, NULL);
 
 	return (*GTK_WIDGET_CLASS (parent_klass)->key_release_event) (widget, event);
diff --git a/src/gui-util.c b/src/gui-util.c
index 712a164..36dfcf0 100644
--- a/src/gui-util.c
+++ b/src/gui-util.c
@@ -214,7 +214,7 @@ static gint
 cb_keyed_dialog_keypress (GtkWidget *dialog, GdkEventKey *event,
 			  G_GNUC_UNUSED gpointer user)
 {
-	if (event->keyval == GDK_Escape) {
+	if (event->keyval == GDK_KEY_Escape) {
 		gtk_widget_destroy (GTK_WIDGET (dialog));
 		return TRUE;
 	}
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 1404aee..bc422e8 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -3708,7 +3708,7 @@ get_accel_label (GtkMenuItem *item, guint *key)
 	GList *l;
 	char const *res = NULL;
 
-	*key = GDK_VoidSymbol;
+	*key = GDK_KEY_VoidSymbol;
 	for (l = children; l; l = l->next) {
 		GtkWidget *w = l->data;
 
@@ -3742,7 +3742,7 @@ check_underlines (GtkWidget *w, char const *path)
 			g_free (newpath);
 		}
 
-		if (key != GDK_VoidSymbol) {
+		if (key != GDK_KEY_VoidSymbol) {
 			char const *prev = g_hash_table_lookup (used, GUINT_TO_POINTER (key));
 			if (prev) {
 				/* xgettext: Translators: if this warning shows up when
diff --git a/src/widgets/gnm-cell-combo-view.c b/src/widgets/gnm-cell-combo-view.c
index b1717c4..c2b7725 100644
--- a/src/widgets/gnm-cell-combo-view.c
+++ b/src/widgets/gnm-cell-combo-view.c
@@ -152,20 +152,20 @@ static gint
 cb_ccombo_key_press (GtkWidget *popup, GdkEventKey *event, GtkWidget *list)
 {
 	switch (event->keyval) {
-	case GDK_Escape :
+	case GDK_KEY_Escape :
 		ccombo_popup_destroy (list);
 		return TRUE;
 
-	case GDK_KP_Down :
-	case GDK_Down :
-	case GDK_KP_Up :
+	case GDK_KEY_KP_Down :
+	case GDK_KEY_Down :
+	case GDK_KEY_KP_Up :
 		/* fallthrough */
-	case GDK_Up :
+	case GDK_KEY_Up :
 		if (!(event->state & GDK_MOD1_MASK))
 			return FALSE;
 
 	case GDK_KP_Enter :
-	case GDK_Return :
+	case GDK_KEY_Return :
 		ccombo_activate (GTK_TREE_VIEW (list), FALSE);
 		return TRUE;
 	default :
diff --git a/src/widgets/gnm-notebook.c b/src/widgets/gnm-notebook.c
index b5a21af..0e09001 100644
--- a/src/widgets/gnm-notebook.c
+++ b/src/widgets/gnm-notebook.c
@@ -1100,10 +1100,10 @@ add_tab_bindings (GtkBindingSet    *binding_set,
 		  GdkModifierType   modifiers,
 		  GtkDirectionType  direction)
 {
-  gtk_binding_entry_add_signal (binding_set, GDK_Tab, modifiers,
+  gtk_binding_entry_add_signal (binding_set, GDK_KEY_Tab, modifiers,
                                 "move_focus_out", 1,
                                 GTK_TYPE_DIRECTION_TYPE, direction);
-  gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, modifiers,
+  gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Tab, modifiers,
                                 "move_focus_out", 1,
                                 GTK_TYPE_DIRECTION_TYPE, direction);
 }
@@ -1113,7 +1113,7 @@ add_arrow_bindings (GtkBindingSet    *binding_set,
 		    guint             keysym,
 		    GtkDirectionType  direction)
 {
-  guint keypad_keysym = keysym - GDK_Left + GDK_KP_Left;
+  guint keypad_keysym = keysym - GDK_KEY_Left + GDK_KEY_KP_Left;
 
   gtk_binding_entry_add_signal (binding_set, keysym, GDK_CONTROL_MASK,
                                 "move_focus_out", 1,
@@ -1129,7 +1129,7 @@ add_reorder_bindings (GtkBindingSet    *binding_set,
 		      GtkDirectionType  direction,
 		      gboolean          move_to_last)
 {
-  guint keypad_keysym = keysym - GDK_Left + GDK_KP_Left;
+  guint keypad_keysym = keysym - GDK_KEY_Left + GDK_KEY_KP_Left;
 
   gtk_binding_entry_add_signal (binding_set, keysym, GDK_MOD1_MASK,
 				"reorder_tab", 2,
@@ -1639,7 +1639,7 @@ ggg_notebook_class_init (GggNotebookClass *class)
 
   binding_set = gtk_binding_set_by_class (class);
   gtk_binding_entry_add_signal (binding_set,
-                                GDK_space, 0,
+                                GDK_KEY_space, 0,
                                 "select_page", 1,
                                 G_TYPE_BOOLEAN, FALSE);
   gtk_binding_entry_add_signal (binding_set,
@@ -1648,53 +1648,53 @@ ggg_notebook_class_init (GggNotebookClass *class)
                                 G_TYPE_BOOLEAN, FALSE);
 
   gtk_binding_entry_add_signal (binding_set,
-                                GDK_Home, 0,
+                                GDK_KEY_Home, 0,
                                 "focus_tab", 1,
                                 GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_FIRST);
   gtk_binding_entry_add_signal (binding_set,
-                                GDK_KP_Home, 0,
+                                GDK_KEY_KP_Home, 0,
                                 "focus_tab", 1,
                                 GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_FIRST);
   gtk_binding_entry_add_signal (binding_set,
-                                GDK_End, 0,
+                                GDK_KEY_End, 0,
                                 "focus_tab", 1,
                                 GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_LAST);
   gtk_binding_entry_add_signal (binding_set,
-                                GDK_KP_End, 0,
+                                GDK_KEY_KP_End, 0,
                                 "focus_tab", 1,
                                 GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_LAST);
 
   gtk_binding_entry_add_signal (binding_set,
-                                GDK_Page_Up, GDK_CONTROL_MASK,
+                                GDK_KEY_Page_Up, GDK_CONTROL_MASK,
                                 "change_current_page", 1,
                                 G_TYPE_INT, -1);
   gtk_binding_entry_add_signal (binding_set,
-                                GDK_Page_Down, GDK_CONTROL_MASK,
+                                GDK_KEY_Page_Down, GDK_CONTROL_MASK,
                                 "change_current_page", 1,
                                 G_TYPE_INT, 1);
 
   gtk_binding_entry_add_signal (binding_set,
-                                GDK_Page_Up, GDK_CONTROL_MASK | GDK_MOD1_MASK,
+                                GDK_KEY_Page_Up, GDK_CONTROL_MASK | GDK_MOD1_MASK,
                                 "change_current_page", 1,
                                 G_TYPE_INT, -1);
   gtk_binding_entry_add_signal (binding_set,
-                                GDK_Page_Down, GDK_CONTROL_MASK | GDK_MOD1_MASK,
+                                GDK_KEY_Page_Down, GDK_CONTROL_MASK | GDK_MOD1_MASK,
                                 "change_current_page", 1,
                                 G_TYPE_INT, 1);
 
-  add_arrow_bindings (binding_set, GDK_Up, GTK_DIR_UP);
-  add_arrow_bindings (binding_set, GDK_Down, GTK_DIR_DOWN);
-  add_arrow_bindings (binding_set, GDK_Left, GTK_DIR_LEFT);
-  add_arrow_bindings (binding_set, GDK_Right, GTK_DIR_RIGHT);
-
-  add_reorder_bindings (binding_set, GDK_Up, GTK_DIR_UP, FALSE);
-  add_reorder_bindings (binding_set, GDK_Down, GTK_DIR_DOWN, FALSE);
-  add_reorder_bindings (binding_set, GDK_Left, GTK_DIR_LEFT, FALSE);
-  add_reorder_bindings (binding_set, GDK_Right, GTK_DIR_RIGHT, FALSE);
-  add_reorder_bindings (binding_set, GDK_Home, GTK_DIR_LEFT, TRUE);
-  add_reorder_bindings (binding_set, GDK_Home, GTK_DIR_UP, TRUE);
-  add_reorder_bindings (binding_set, GDK_End, GTK_DIR_RIGHT, TRUE);
-  add_reorder_bindings (binding_set, GDK_End, GTK_DIR_DOWN, TRUE);
+  add_arrow_bindings (binding_set, GDK_KEY_Up, GTK_DIR_UP);
+  add_arrow_bindings (binding_set, GDK_KEY_Down, GTK_DIR_DOWN);
+  add_arrow_bindings (binding_set, GDK_KEY_Left, GTK_DIR_LEFT);
+  add_arrow_bindings (binding_set, GDK_KEY_Right, GTK_DIR_RIGHT);
+
+  add_reorder_bindings (binding_set, GDK_KEY_Up, GTK_DIR_UP, FALSE);
+  add_reorder_bindings (binding_set, GDK_KEY_Down, GTK_DIR_DOWN, FALSE);
+  add_reorder_bindings (binding_set, GDK_KEY_Left, GTK_DIR_LEFT, FALSE);
+  add_reorder_bindings (binding_set, GDK_KEY_Right, GTK_DIR_RIGHT, FALSE);
+  add_reorder_bindings (binding_set, GDK_KEY_Home, GTK_DIR_LEFT, TRUE);
+  add_reorder_bindings (binding_set, GDK_KEY_Home, GTK_DIR_UP, TRUE);
+  add_reorder_bindings (binding_set, GDK_KEY_End, GTK_DIR_RIGHT, TRUE);
+  add_reorder_bindings (binding_set, GDK_KEY_End, GTK_DIR_DOWN, TRUE);
 
   add_tab_bindings (binding_set, GDK_CONTROL_MASK, GTK_DIR_TAB_FORWARD);
   add_tab_bindings (binding_set, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index f45ddbc..a18f261 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -1153,15 +1153,15 @@ cb_gee_key_press_event (GtkEntry	*entry,
 	int state = gnumeric_filter_modifiers (event->state);
 
 	switch (event->keyval) {
-	case GDK_Up:	case GDK_KP_Up:
-	case GDK_Down:	case GDK_KP_Down:
+	case GDK_KEY_Up:	case GDK_KEY_KP_Up:
+	case GDK_KEY_Down:	case GDK_KEY_KP_Down:
 		if (gee->is_cell_renderer)
 			return FALSE;
 		/* Ignore these keys */
 		return TRUE;
-		/* GDK_F2 starts editing */
-		/* GDK_F3 opens the paste names dialog */
-	case GDK_F4: {
+		/* GDK_KEY_F2 starts editing */
+		/* GDK_KEY_F3 opens the paste names dialog */
+	case GDK_KEY_F4: {
 		/* Cycle absolute reference mode through the sequence rel/rel,
 		 * abs/abs, rel/abs, abs/rel and back to rel/rel. Update text
 		 * displayed in entry.
@@ -1229,7 +1229,7 @@ cb_gee_key_press_event (GtkEntry	*entry,
 		return TRUE;
 	}
 
-	case GDK_Escape:
+	case GDK_KEY_Escape:
 		if (gee->is_cell_renderer) {
 			gtk_entry_set_editing_cancelled (entry, TRUE);
 			gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (gee));
@@ -1240,7 +1240,7 @@ cb_gee_key_press_event (GtkEntry	*entry,
 		return TRUE;
 
 	case GDK_KP_Enter:
-	case GDK_Return:
+	case GDK_KEY_Return:
 		if (gee->is_cell_renderer)
 			return FALSE;
 		/* Is this the right way to append a newline ?? */
@@ -1258,9 +1258,9 @@ cb_gee_key_press_event (GtkEntry	*entry,
 		is_enter = TRUE;
 		/* fall through */
 
-	case GDK_Tab:
-	case GDK_ISO_Left_Tab:
-	case GDK_KP_Tab:
+	case GDK_KEY_Tab:
+	case GDK_KEY_ISO_Left_Tab:
+	case GDK_KEY_KP_Tab:
 		/* Tab is only applicable for the main entry */
 		 if (gee->is_cell_renderer || !wbcg_is_editing (wbcg))
 			break;
@@ -1302,8 +1302,8 @@ cb_gee_key_press_event (GtkEntry	*entry,
 		return TRUE;
 	}
 
-	case GDK_KP_Separator:
-	case GDK_KP_Decimal: {
+	case GDK_KEY_KP_Separator:
+	case GDK_KEY_KP_Decimal: {
 		GtkEditable *editable = GTK_EDITABLE (entry);
 		gint start, end, l;
 		GString const* s = go_locale_get_decimal ();
@@ -1316,7 +1316,7 @@ cb_gee_key_press_event (GtkEntry	*entry,
 		return TRUE;
 	}
 
-	case GDK_F9: {
+	case GDK_KEY_F9: {
 		/* Replace selection by its evaluated result.  */
 		GtkEditable *editable = GTK_EDITABLE (entry);
 		gint start, end;
diff --git a/src/widgets/widget-editable-label.c b/src/widgets/widget-editable-label.c
index d2c751c..7609d5b 100644
--- a/src/widgets/widget-editable-label.c
+++ b/src/widgets/widget-editable-label.c
@@ -199,7 +199,7 @@ el_key_press_event (GtkWidget *w, GdkEventKey *event)
 	if (el->unedited_text == NULL)
 		return FALSE;
 
-	if (event->keyval == GDK_Escape) {
+	if (event->keyval == GDK_KEY_Escape) {
 		el_cancel_editing (el);
 		return TRUE;
 	}



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