Commit 7c60bb51 authored by Michael Natterer's avatar Michael Natterer 😴

app: use more of the new GDK_KEY_foo key names

and move the compat defines from display-enums.h to widgets-enums.h
parent 2468f9fd
......@@ -41,29 +41,6 @@
#endif
#if ! GTK_CHECK_VERSION (2, 22, 0)
#define GDK_KEY_Shift_L GDK_Shift_L
#define GDK_KEY_Shift_R GDK_Shift_R
#define GDK_KEY_Control_L GDK_Control_L
#define GDK_KEY_Control_R GDK_Control_R
#define GDK_KEY_Alt_L GDK_Alt_L
#define GDK_KEY_Alt_R GDK_Alt_R
#define GDK_KEY_Left GDK_Left
#define GDK_KEY_Right GDK_Right
#define GDK_KEY_Up GDK_Up
#define GDK_KEY_Down GDK_Down
#define GDK_KEY_Tab GDK_Tab
#define GDK_KEY_ISO_Left_Tab GDK_ISO_Left_Tab
#define GDK_KEY_space GDK_space
#define GDK_KEY_KP_Space GDK_KP_Space
#define GDK_KEY_Return GDK_Return
#define GDK_KEY_KP_Enter GDK_KP_Enter
#define GDK_KEY_ISO_Enter GDK_ISO_Enter
#define GDK_KEY_BackSpace GDK_BackSpace
#define GDK_KEY_Escape GDK_Escape
#endif
typedef struct _GimpCanvas GimpCanvas;
typedef struct _GimpCanvasItem GimpCanvasItem;
typedef struct _GimpCanvasGroup GimpCanvasGroup;
......
......@@ -338,7 +338,7 @@ gimp_scale_combo_box_entry_key_press (GtkWidget *entry,
GdkEventKey *event,
GimpScaleComboBox *combo_box)
{
if (event->keyval == GDK_Escape)
if (event->keyval == GDK_KEY_Escape)
{
gimp_scale_combo_box_set_scale (combo_box, combo_box->scale);
......@@ -347,9 +347,9 @@ gimp_scale_combo_box_entry_key_press (GtkWidget *entry,
return TRUE;
}
if (event->keyval == GDK_Tab ||
event->keyval == GDK_KP_Tab ||
event->keyval == GDK_ISO_Left_Tab)
if (event->keyval == GDK_KEY_Tab ||
event->keyval == GDK_KEY_KP_Tab ||
event->keyval == GDK_KEY_ISO_Left_Tab)
{
gimp_scale_combo_box_entry_activate (entry, combo_box);
......
......@@ -381,14 +381,14 @@ gimp_cage_tool_key_press (GimpTool *tool,
switch (kevent->keyval)
{
case GDK_BackSpace:
case GDK_KEY_BackSpace:
if (! ct->cage_complete && ct->tool_state == CAGE_STATE_WAIT)
gimp_cage_tool_remove_last_handle (ct);
return TRUE;
case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
if (ct->tool_state == DEFORM_STATE_WAIT)
{
gimp_tool_control_set_preserve (tool->control, TRUE);
......@@ -405,7 +405,7 @@ gimp_cage_tool_key_press (GimpTool *tool,
}
return TRUE;
case GDK_Escape:
case GDK_KEY_Escape:
gimp_cage_tool_halt (ct);
return TRUE;
......
......@@ -1127,10 +1127,10 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
/* bail out early if it is not an arrow key event */
if (kevent->keyval != GDK_Left &&
kevent->keyval != GDK_Right &&
kevent->keyval != GDK_Up &&
kevent->keyval != GDK_Down)
if (kevent->keyval != GDK_KEY_Left &&
kevent->keyval != GDK_KEY_Right &&
kevent->keyval != GDK_KEY_Up &&
kevent->keyval != GDK_KEY_Down)
return FALSE;
/* adapt arrow velocity to the zoom factor when holding <shift> */
......@@ -1143,38 +1143,38 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
* them.
*/
inc_x = process_event_queue_keys (kevent,
GDK_Left,
GDK_KEY_Left,
kevent->state | GDK_SHIFT_MASK,
-1 * velocity,
GDK_Left,
GDK_KEY_Left,
kevent->state & ~GDK_SHIFT_MASK,
-1,
GDK_Right,
GDK_KEY_Right,
kevent->state | GDK_SHIFT_MASK,
1 * velocity,
GDK_Right,
GDK_KEY_Right,
kevent->state & ~GDK_SHIFT_MASK,
1,
0);
inc_y = process_event_queue_keys (kevent,
GDK_Up,
GDK_KEY_Up,
kevent->state | GDK_SHIFT_MASK,
-1 * velocity,
GDK_Up,
GDK_KEY_Up,
kevent->state & ~GDK_SHIFT_MASK,
-1,
GDK_Down,
GDK_KEY_Down,
kevent->state | GDK_SHIFT_MASK,
1 * velocity,
GDK_Down,
GDK_KEY_Down,
kevent->state & ~GDK_SHIFT_MASK,
1,
......
......@@ -396,13 +396,13 @@ gimp_foreground_select_tool_key_press (GimpTool *tool,
{
switch (kevent->keyval)
{
case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
gimp_foreground_select_tool_apply (fg_select, display);
return TRUE;
case GDK_Escape:
case GDK_KEY_Escape:
gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, display);
return TRUE;
......
......@@ -1435,17 +1435,17 @@ gimp_free_select_tool_key_press (GimpTool *tool,
switch (kevent->keyval)
{
case GDK_BackSpace:
case GDK_KEY_BackSpace:
gimp_free_select_tool_remove_last_segment (fst);
return TRUE;
case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
gimp_free_select_tool_commit (fst, display);
return TRUE;
case GDK_Escape:
case GDK_KEY_Escape:
gimp_free_select_tool_halt (fst);
return TRUE;
......
......@@ -442,21 +442,21 @@ gimp_image_map_tool_key_press (GimpTool *tool,
{
switch (kevent->keyval)
{
case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
gimp_image_map_tool_response (image_map_tool->dialog,
GTK_RESPONSE_OK,
image_map_tool);
return TRUE;
case GDK_BackSpace:
case GDK_KEY_BackSpace:
gimp_image_map_tool_response (image_map_tool->dialog,
RESPONSE_RESET,
image_map_tool);
return TRUE;
case GDK_Escape:
case GDK_KEY_Escape:
gimp_image_map_tool_response (image_map_tool->dialog,
GTK_RESPONSE_CANCEL,
image_map_tool);
......
......@@ -1082,9 +1082,9 @@ gimp_iscissors_tool_key_press (GimpTool *tool,
switch (kevent->keyval)
{
case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
if (iscissors->connected && iscissors->mask)
{
gimp_iscissors_tool_apply (iscissors, display);
......@@ -1092,7 +1092,7 @@ gimp_iscissors_tool_key_press (GimpTool *tool,
}
return FALSE;
case GDK_Escape:
case GDK_KEY_Escape:
gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, display);
return TRUE;
......
......@@ -481,7 +481,7 @@ gimp_measure_tool_key_press (GimpTool *tool,
{
switch (kevent->keyval)
{
case GDK_Escape:
case GDK_KEY_Escape:
gimp_measure_tool_halt (GIMP_MEASURE_TOOL (tool));
return TRUE;
......
......@@ -21,7 +21,6 @@
#include <gegl.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
......
......@@ -1453,27 +1453,27 @@ gimp_rectangle_tool_key_press (GimpTool *tool,
switch (kevent->keyval)
{
case GDK_Up:
case GDK_KEY_Up:
dy = -1;
break;
case GDK_Left:
case GDK_KEY_Left:
dx = -1;
break;
case GDK_Right:
case GDK_KEY_Right:
dx = 1;
break;
case GDK_Down:
case GDK_KEY_Down:
dy = 1;
break;
case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
if (gimp_rectangle_tool_execute (rect_tool))
gimp_rectangle_tool_halt (rect_tool);
return TRUE;
case GDK_Escape:
case GDK_KEY_Escape:
gimp_rectangle_tool_cancel (rect_tool);
gimp_rectangle_tool_halt (rect_tool);
return TRUE;
......
......@@ -139,19 +139,19 @@ gimp_rotate_tool_key_press (GimpTool *tool,
switch (kevent->keyval)
{
case GDK_Up:
case GDK_KEY_Up:
gtk_spin_button_spin (angle_spin, GTK_SPIN_STEP_FORWARD, 0.0);
return TRUE;
case GDK_Down:
case GDK_KEY_Down:
gtk_spin_button_spin (angle_spin, GTK_SPIN_STEP_BACKWARD, 0.0);
return TRUE;
case GDK_Left:
case GDK_KEY_Left:
gtk_spin_button_spin (angle_spin, GTK_SPIN_PAGE_FORWARD, 0.0);
return TRUE;
case GDK_Right:
case GDK_KEY_Right:
gtk_spin_button_spin (angle_spin, GTK_SPIN_PAGE_BACKWARD, 0.0);
return TRUE;
......
......@@ -19,7 +19,6 @@
#include <gegl.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpwidgets/gimpwidgets.h"
......
......@@ -446,21 +446,21 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
switch (kevent->keyval)
{
case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
gimp_text_tool_reset_im_context (text_tool);
gimp_text_tool_enter_text (text_tool, "\n");
break;
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:
gimp_text_tool_reset_im_context (text_tool);
gimp_text_tool_enter_text (text_tool, "\t");
break;
case GDK_Escape:
case GDK_KEY_Escape:
gimp_rectangle_tool_cancel (GIMP_RECTANGLE_TOOL (text_tool));
gimp_tool_control (GIMP_TOOL (text_tool), GIMP_TOOL_ACTION_HALT,
GIMP_TOOL (text_tool)->display);
......
......@@ -431,17 +431,17 @@ gimp_transform_tool_key_press (GimpTool *tool,
{
switch (kevent->keyval)
{
case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
gimp_transform_tool_response (NULL, GTK_RESPONSE_OK, trans_tool);
return TRUE;
case GDK_BackSpace:
case GDK_KEY_BackSpace:
gimp_transform_tool_response (NULL, RESPONSE_RESET, trans_tool);
return TRUE;
case GDK_Escape:
case GDK_KEY_Escape:
gimp_transform_tool_response (NULL, GTK_RESPONSE_CANCEL, trans_tool);
return TRUE;
}
......
......@@ -818,21 +818,21 @@ gimp_vector_tool_key_press (GimpTool *tool,
switch (kevent->keyval)
{
case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
gimp_vector_tool_to_selection_extended (vector_tool, kevent->state);
break;
case GDK_BackSpace:
case GDK_Delete:
case GDK_KEY_BackSpace:
case GDK_KEY_Delete:
gimp_vector_tool_delete_selected_anchors (vector_tool);
break;
case GDK_Left:
case GDK_Right:
case GDK_Up:
case GDK_Down:
case GDK_KEY_Left:
case GDK_KEY_Right:
case GDK_KEY_Up:
case GDK_KEY_Down:
xdist = FUNSCALEX (shell, pixels);
ydist = FUNSCALEY (shell, pixels);
......@@ -842,19 +842,19 @@ gimp_vector_tool_key_press (GimpTool *tool,
switch (kevent->keyval)
{
case GDK_Left:
case GDK_KEY_Left:
gimp_vector_tool_move_selected_anchors (vector_tool, -xdist, 0);
break;
case GDK_Right:
case GDK_KEY_Right:
gimp_vector_tool_move_selected_anchors (vector_tool, xdist, 0);
break;
case GDK_Up:
case GDK_KEY_Up:
gimp_vector_tool_move_selected_anchors (vector_tool, 0, -ydist);
break;
case GDK_Down:
case GDK_KEY_Down:
gimp_vector_tool_move_selected_anchors (vector_tool, 0, ydist);
break;
......@@ -866,7 +866,7 @@ gimp_vector_tool_key_press (GimpTool *tool,
vector_tool->have_undo = FALSE;
break;
case GDK_Escape:
case GDK_KEY_Escape:
if (options->edit_mode != GIMP_VECTOR_MODE_DESIGN)
g_object_set (options, "vectors-edit-mode",
GIMP_VECTOR_MODE_DESIGN, NULL);
......
......@@ -22,7 +22,6 @@
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
......
......@@ -139,19 +139,19 @@ gimp_container_grid_view_class_init (GimpContainerGridViewClass *klass)
GTK_TYPE_MOVEMENT_STEP,
G_TYPE_INT);
gtk_binding_entry_add_signal (binding_set, GDK_Home, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Home, 0,
"move-cursor", 2,
G_TYPE_ENUM, GTK_MOVEMENT_BUFFER_ENDS,
G_TYPE_INT, -1);
gtk_binding_entry_add_signal (binding_set, GDK_End, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_End, 0,
"move-cursor", 2,
G_TYPE_ENUM, GTK_MOVEMENT_BUFFER_ENDS,
G_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Up, 0,
"move-cursor", 2,
G_TYPE_ENUM, GTK_MOVEMENT_PAGES,
G_TYPE_INT, -1);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Down, 0,
"move-cursor", 2,
G_TYPE_ENUM, GTK_MOVEMENT_PAGES,
G_TYPE_INT, 1);
......
......@@ -116,17 +116,17 @@ gimp_container_popup_class_init (GimpContainerPopupClass *klass)
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
"cancel", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Return, 0,
"confirm", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Enter, 0,
"confirm", 0);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_ISO_Enter, 0,
"confirm", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_space, 0,
"confirm", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Space, 0,
"confirm", 0);
}
......
......@@ -161,7 +161,7 @@ gimp_container_tree_view_class_init (GimpContainerTreeViewClass *klass)
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_F2, 0,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_F2, 0,
"edit-name", 0);
g_type_class_add_private (klass, sizeof (GimpContainerTreeViewPriv));
......
......@@ -62,103 +62,103 @@ G_DEFINE_TYPE (GimpControllerKeyboard, gimp_controller_keyboard,
static KeyboardEvent keyboard_events[] =
{
{ GDK_Up, GDK_MOD1_MASK | GDK_CONTROL_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Up, GDK_MOD1_MASK | GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"cursor-up-shift-control-alt",
N_("Cursor Up") },
{ GDK_Up, GDK_MOD1_MASK | GDK_CONTROL_MASK,
{ GDK_KEY_Up, GDK_MOD1_MASK | GDK_CONTROL_MASK,
"cursor-up-control-alt",
N_("Cursor Up") },
{ GDK_Up, GDK_MOD1_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Up, GDK_MOD1_MASK | GDK_SHIFT_MASK,
"cursor-up-shift-alt",
N_("Cursor Up") },
{ GDK_Up, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Up, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"cursor-up-shift-control",
N_("Cursor Up") },
{ GDK_Up, GDK_MOD1_MASK,
{ GDK_KEY_Up, GDK_MOD1_MASK,
"cursor-up-alt",
N_("Cursor Up") },
{ GDK_Up, GDK_CONTROL_MASK,
{ GDK_KEY_Up, GDK_CONTROL_MASK,
"cursor-up-control",
N_("Cursor Up") },
{ GDK_Up, GDK_SHIFT_MASK,
{ GDK_KEY_Up, GDK_SHIFT_MASK,
"cursor-up-shift",
N_("Cursor Up") },
{ GDK_Up, 0,
{ GDK_KEY_Up, 0,
"cursor-up",
N_("Cursor Up") },
{ GDK_Down, GDK_MOD1_MASK | GDK_CONTROL_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Down, GDK_MOD1_MASK | GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"cursor-down-shift-control-alt",
N_("Cursor Down") },
{ GDK_Down, GDK_MOD1_MASK | GDK_CONTROL_MASK,
{ GDK_KEY_Down, GDK_MOD1_MASK | GDK_CONTROL_MASK,
"cursor-down-control-alt",
N_("Cursor Down") },
{ GDK_Down, GDK_MOD1_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Down, GDK_MOD1_MASK | GDK_SHIFT_MASK,
"cursor-down-shift-alt",
N_("Cursor Down") },
{ GDK_Down, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Down, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"cursor-down-shift-control",
N_("Cursor Down") },
{ GDK_Down, GDK_MOD1_MASK,
{ GDK_KEY_Down, GDK_MOD1_MASK,
"cursor-down-alt",
N_("Cursor Down") },
{ GDK_Down, GDK_CONTROL_MASK,
{ GDK_KEY_Down, GDK_CONTROL_MASK,
"cursor-down-control",
N_("Cursor Down") },
{ GDK_Down, GDK_SHIFT_MASK,
{ GDK_KEY_Down, GDK_SHIFT_MASK,
"cursor-down-shift",
N_("Cursor Down") },
{ GDK_Down, 0,
{ GDK_KEY_Down, 0,
"cursor-down",
N_("Cursor Down") },
{ GDK_Left, GDK_MOD1_MASK | GDK_CONTROL_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Left, GDK_MOD1_MASK | GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"cursor-left-shift-control-alt",
N_("Cursor Left") },
{ GDK_Left, GDK_MOD1_MASK | GDK_CONTROL_MASK,
{ GDK_KEY_Left, GDK_MOD1_MASK | GDK_CONTROL_MASK,
"cursor-left-control-alt",
N_("Cursor Left") },
{ GDK_Left, GDK_MOD1_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Left, GDK_MOD1_MASK | GDK_SHIFT_MASK,
"cursor-left-shift-alt",
N_("Cursor Left") },
{ GDK_Left, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Left, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"cursor-left-shift-control",
N_("Cursor Left") },
{ GDK_Left, GDK_MOD1_MASK,
{ GDK_KEY_Left, GDK_MOD1_MASK,
"cursor-left-alt",
N_("Cursor Left") },
{ GDK_Left, GDK_CONTROL_MASK,
{ GDK_KEY_Left, GDK_CONTROL_MASK,
"cursor-left-control",
N_("Cursor Left") },
{ GDK_Left, GDK_SHIFT_MASK,
{ GDK_KEY_Left, GDK_SHIFT_MASK,
"cursor-left-shift",
N_("Cursor Left") },
{ GDK_Left, 0,
{ GDK_KEY_Left, 0,
"cursor-left",
N_("Cursor Left") },
{ GDK_Right, GDK_MOD1_MASK | GDK_CONTROL_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Right, GDK_MOD1_MASK | GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"cursor-right-shift-control-alt",
N_("Cursor Right") },
{ GDK_Right, GDK_MOD1_MASK | GDK_CONTROL_MASK,
{ GDK_KEY_Right, GDK_MOD1_MASK | GDK_CONTROL_MASK,
"cursor-right-control-alt",
N_("Cursor Right") },
{ GDK_Right, GDK_MOD1_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Right, GDK_MOD1_MASK | GDK_SHIFT_MASK,
"cursor-right-shift-alt",
N_("Cursor Right") },
{ GDK_Right, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
{ GDK_KEY_Right, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"cursor-right-shift-control",
N_("Cursor Right") },
{ GDK_Right, GDK_MOD1_MASK,
{ GDK_KEY_Right, GDK_MOD1_MASK,
"cursor-right-alt",
N_("Cursor Right") },
{ GDK_Right, GDK_CONTROL_MASK,
{ GDK_KEY_Right, GDK_CONTROL_MASK,
"cursor-right-control",
N_("Cursor Right") },
{ GDK_Right, GDK_SHIFT_MASK,
{ GDK_KEY_Right, GDK_SHIFT_MASK,
"cursor-right-shift",
N_("Cursor Right") },
{ GDK_Right, 0,
{ GDK_KEY_Right, 0,
"cursor-right",
N_("Cursor Right") }
};
......
......@@ -184,11 +184,11 @@ gimp_curve_view_class_init (GimpCurveViewClass *klass)
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_x, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_x, GDK_CONTROL_MASK,
"cut-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_c, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_c, GDK_CONTROL_MASK,
"copy-clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_v, GDK_CONTROL_MASK,
gtk_binding_entry_add_signal (binding_set, GDK_KEY_v, GDK_CONTROL_MASK,
"paste-clipboard", 0);
}
......
......@@ -558,7 +558,7 @@ gimp_data_editor_name_key_press (GtkWidget *widget,
GdkEventKey *kevent,
GimpDataEditor *editor)
{
if (kevent->keyval == GDK_Escape)
if (kevent->keyval == GDK_KEY_Escape)
{
gtk_entry_set_text (GTK_ENTRY (editor->name_entry),
gimp_object_get_name (editor->data));
......
......@@ -404,19 +404,19 @@ gimp_navigation_view_key_press (GtkWidget *widget,
switch (kevent->keyval)
{
case GDK_Up:
case GDK_KEY_Up:
scroll_y = -1;
break;
case GDK_Left:
case GDK_KEY_Left:
scroll_x = -1;
break;
case GDK_Right:
case GDK_KEY_Right:
scroll_x = 1;
break;
case GDK_Down:
case GDK_KEY_Down:
scroll_y = 1;
break;
......
......@@ -111,7 +111,7 @@ gimp_overlay_dialog_class_init (GimpOverlayDialogClass *klass)
G_TYPE_NONE, 0);
gtk_binding_entry_add_signal (gtk_binding_set_by_class (klass),
GDK_Escape, 0, "close", 0);
GDK_KEY_Escape, 0, "close", 0);
}
static void
......
......@@ -271,11 +271,11 @@ gimp_palette_view_key_press (GtkWidget *widget,
GimpPaletteView *view = GIMP_PALETTE_VIEW (widget);
if (view->selected &&
(kevent->keyval == GDK_space ||
kevent->keyval == GDK_KP_Space ||
kevent->keyval == GDK_Return ||
kevent->keyval == GDK_KP_Enter ||
kevent->keyval == GDK_ISO_Enter))
(kevent->keyval == GDK_KEY_space ||
kevent->keyval == GDK_KEY_KP_Space ||
kevent->keyval == GDK_KEY_Return ||
kevent->keyval == GDK_KEY_KP_Enter ||
kevent->keyval == GDK_KEY_ISO_Enter))
{
g_signal_emit (view, view_signals[ENTRY_CLICKED], 0,
view->selected, kevent->state);
......
......@@ -1341,9 +1341,9 @@ gimp_tag_entry_key_press (GtkWidget *widget,