app/tools/gimpcroptool.c app/tools/gimpnewrectselecttool.c added status

2005-10-08  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimpcroptool.c
  * app/tools/gimpnewrectselecttool.c
  * app/tools/gimprectangletool.c: added status bar info to tell the user
  what to do once the rectangle area is drawn. Fixes bug #318267.
This commit is contained in:
Karine Delvare 2005-10-08 19:20:31 +00:00 committed by Karine Delvare
parent 3d68f81160
commit 1f50357015
5 changed files with 83 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2005-10-08 Karine Delvare <kdelvare@nerim.net>
* app/tools/gimpcroptool.c
* app/tools/gimpnewrectselecttool.c
* app/tools/gimprectangletool.c: added status bar info to tell the user
what to do once the rectangle area is drawn. Fixes bug #318267.
2005-10-07 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/grid.pdb: fixed (false) uninitialized variable

View File

@ -53,6 +53,11 @@ static void gimp_crop_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_crop_tool_button_release (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp);
static void gimp_crop_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
@ -142,7 +147,7 @@ gimp_crop_tool_class_init (GimpCropToolClass *klass)
tool_class->initialize = gimp_rectangle_tool_initialize;
tool_class->control = gimp_crop_tool_control;
tool_class->button_press = gimp_rectangle_tool_button_press;
tool_class->button_release = gimp_rectangle_tool_button_release;
tool_class->button_release = gimp_crop_tool_button_release;
tool_class->motion = gimp_rectangle_tool_motion;
tool_class->key_press = gimp_rectangle_tool_key_press;
tool_class->modifier_key = gimp_rectangle_tool_modifier_key;
@ -196,6 +201,25 @@ gimp_crop_tool_control (GimpTool *tool,
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
static void
gimp_crop_tool_button_release (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp)
{
GimpCropOptions *options = GIMP_CROP_OPTIONS (tool->tool_info->tool_options);
if (options->crop_mode == GIMP_CROP_MODE_CROP)
gimp_tool_push_status (tool, gdisp,
_("Click or press enter to crop."));
else
gimp_tool_push_status (tool, gdisp,
_("Click or press enter to resize."));
gimp_rectangle_tool_button_release (tool, coords, time, state, gdisp);
}
static void
gimp_crop_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
@ -223,6 +247,8 @@ gimp_crop_tool_execute (GimpRectangleTool *rectangle,
options = GIMP_CROP_OPTIONS (tool->tool_info->tool_options);
gimp_tool_pop_status (tool, tool->gdisp);
gimage = tool->gdisp->gimage;
max_x = gimage->width;
max_y = gimage->height;

View File

@ -64,6 +64,11 @@ static void gimp_new_rect_select_tool_finalize (GObject *object);
static void gimp_new_rect_select_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_new_rect_select_tool_button_release (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp);
static void gimp_new_rect_select_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
@ -152,7 +157,7 @@ gimp_new_rect_select_tool_class_init (GimpNewRectSelectToolClass *klass)
tool_class->initialize = gimp_rectangle_tool_initialize;
tool_class->control = gimp_new_rect_select_tool_control;
tool_class->button_press = gimp_rectangle_tool_button_press;
tool_class->button_release = gimp_rectangle_tool_button_release;
tool_class->button_release = gimp_new_rect_select_tool_button_release;
tool_class->motion = gimp_rectangle_tool_motion;
tool_class->key_press = gimp_rectangle_tool_key_press;
tool_class->modifier_key = gimp_rectangle_tool_modifier_key;
@ -206,6 +211,19 @@ gimp_new_rect_select_tool_control (GimpTool *tool,
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
static void
gimp_new_rect_select_tool_button_release (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp)
{
gimp_tool_push_status (tool, gdisp,
_("Click or press enter to create the selection."));
gimp_rectangle_tool_button_release (tool, coords, time, state, gdisp);
}
static void
gimp_new_rect_select_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
@ -251,6 +269,8 @@ gimp_new_rect_select_tool_execute (GimpRectangleTool *rectangle,
options = GIMP_SELECTION_OPTIONS (tool->tool_info->tool_options);
gimp_tool_pop_status (tool, tool->gdisp);
gimage = tool->gdisp->gimage;
max_x = gimage->width;
max_y = gimage->height;

View File

@ -64,6 +64,11 @@ static void gimp_new_rect_select_tool_finalize (GObject *object);
static void gimp_new_rect_select_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_new_rect_select_tool_button_release (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp);
static void gimp_new_rect_select_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
@ -152,7 +157,7 @@ gimp_new_rect_select_tool_class_init (GimpNewRectSelectToolClass *klass)
tool_class->initialize = gimp_rectangle_tool_initialize;
tool_class->control = gimp_new_rect_select_tool_control;
tool_class->button_press = gimp_rectangle_tool_button_press;
tool_class->button_release = gimp_rectangle_tool_button_release;
tool_class->button_release = gimp_new_rect_select_tool_button_release;
tool_class->motion = gimp_rectangle_tool_motion;
tool_class->key_press = gimp_rectangle_tool_key_press;
tool_class->modifier_key = gimp_rectangle_tool_modifier_key;
@ -206,6 +211,19 @@ gimp_new_rect_select_tool_control (GimpTool *tool,
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
static void
gimp_new_rect_select_tool_button_release (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *gdisp)
{
gimp_tool_push_status (tool, gdisp,
_("Click or press enter to create the selection."));
gimp_rectangle_tool_button_release (tool, coords, time, state, gdisp);
}
static void
gimp_new_rect_select_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
@ -251,6 +269,8 @@ gimp_new_rect_select_tool_execute (GimpRectangleTool *rectangle,
options = GIMP_SELECTION_OPTIONS (tool->tool_info->tool_options);
gimp_tool_pop_status (tool, tool->gdisp);
gimage = tool->gdisp->gimage;
max_x = gimage->width;
max_y = gimage->height;

View File

@ -1335,12 +1335,16 @@ gimp_rectangle_tool_button_release (GimpTool *tool,
GimpDisplay *gdisp)
{
GimpRectangleTool *rectangle = GIMP_RECTANGLE_TOOL (tool);
guint function;
gint lastx, lasty;
gint pressx, pressy;
g_return_if_fail (GIMP_IS_RECTANGLE_TOOL (tool));
gimp_tool_control_halt (tool->control);
g_object_get (rectangle, "function", &function, NULL);
if (function == RECT_EXECUTING)
gimp_tool_pop_status (tool, gdisp);
if (! (state & GDK_BUTTON3_MASK))