From 9870749e1ae28355f42043629e1b51c1103fcd45 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Thu, 12 Apr 2007 20:07:38 +0000 Subject: [PATCH] implement GimpTool::key_press and delegate to the rectangle tool or the 2007-04-12 Sven Neumann * app/tools/gimprectangleselecttool.c: implement GimpTool::key_press and delegate to the rectangle tool or the edit selection tool. This resurrects positioning of floating selections with the cursor keys. svn path=/trunk/; revision=22244 --- ChangeLog | 7 +++++++ app/tools/gimprectangleselecttool.c | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5e9f1cc0d6..0a2825d97a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-04-12 Sven Neumann + * app/tools/gimprectangleselecttool.c: implement + GimpTool::key_press and delegate to the rectangle tool or the edit + selection tool. This resurrects positioning of floating selections + with the cursor keys. + +2007-04-12 Raphaƫl Quinet + * tools/pdbgen/pdb/display.pdb (display_delete): added a note that calling this function may cause data loss. diff --git a/app/tools/gimprectangleselecttool.c b/app/tools/gimprectangleselecttool.c index 6bc62ea7ac..2814edeb1c 100644 --- a/app/tools/gimprectangleselecttool.c +++ b/app/tools/gimprectangleselecttool.c @@ -80,6 +80,9 @@ static void gimp_rect_select_tool_active_modifier_key (GimpTool *to gboolean press, GdkModifierType state, GimpDisplay *display); +static gboolean gimp_rect_select_tool_key_press (GimpTool *tool, + GdkEventKey *kevent, + GimpDisplay *display); static void gimp_rect_select_tool_oper_update (GimpTool *tool, GimpCoords *coords, GdkModifierType state, @@ -156,7 +159,7 @@ gimp_rect_select_tool_class_init (GimpRectSelectToolClass *klass) tool_class->button_press = gimp_rect_select_tool_button_press; tool_class->button_release = gimp_rect_select_tool_button_release; tool_class->motion = gimp_rectangle_tool_motion; - tool_class->key_press = gimp_rectangle_tool_key_press; + tool_class->key_press = gimp_rect_select_tool_key_press; tool_class->active_modifier_key = gimp_rect_select_tool_active_modifier_key; tool_class->oper_update = gimp_rect_select_tool_oper_update; tool_class->cursor_update = gimp_rect_select_tool_cursor_update; @@ -444,6 +447,15 @@ gimp_rect_select_tool_active_modifier_key (GimpTool *tool, gimp_rectangle_tool_active_modifier_key (tool, key, press, state, display); } +static gboolean +gimp_rect_select_tool_key_press (GimpTool *tool, + GdkEventKey *kevent, + GimpDisplay *display) +{ + return (gimp_rectangle_tool_key_press (tool, kevent, display) || + gimp_edit_selection_tool_key_press (tool, kevent, display)); +} + static void gimp_rect_select_tool_oper_update (GimpTool *tool, GimpCoords *coords,