removed dead code.

2006-11-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c: removed dead code.
This commit is contained in:
Sven Neumann 2006-11-08 07:22:42 +00:00 committed by Sven Neumann
parent 99c64d888b
commit 5c0ff0f6e2
2 changed files with 10 additions and 19 deletions

View File

@ -1,3 +1,7 @@
2006-11-07 Sven Neumann <sven@gimp.org>
* app/tools/gimprectangletool.c: removed dead code.
2006-11-07 Simon Budig <simon@gimp.org> 2006-11-07 Simon Budig <simon@gimp.org>
* tools/defcheck.py: provide an exit code indicating if the * tools/defcheck.py: provide an exit code indicating if the

View File

@ -1286,9 +1286,8 @@ gimp_rectangle_tool_key_press (GimpTool *tool,
{ {
GimpRectangleTool *rectangle; GimpRectangleTool *rectangle;
GimpRectangleToolPrivate *private; GimpRectangleToolPrivate *private;
gint inc_x, inc_y; gint inc_x = 0;
gint min_x, min_y; gint inc_y = 0;
gint max_x, max_y;
g_return_val_if_fail (GIMP_IS_RECTANGLE_TOOL (tool), FALSE); g_return_val_if_fail (GIMP_IS_RECTANGLE_TOOL (tool), FALSE);
@ -1298,8 +1297,6 @@ gimp_rectangle_tool_key_press (GimpTool *tool,
if (display != tool->display) if (display != tool->display)
return FALSE; return FALSE;
inc_x = inc_y = 0;
switch (kevent->keyval) switch (kevent->keyval)
{ {
case GDK_Up: case GDK_Up:
@ -1340,10 +1337,6 @@ gimp_rectangle_tool_key_press (GimpTool *tool,
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool)); gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
min_x = min_y = 0;
max_x = display->image->width;
max_y = display->image->height;
g_object_set (rectangle, g_object_set (rectangle,
"x1", private->x1 + inc_x, "x1", private->x1 + inc_x,
"y1", private->y1 + inc_y, "y1", private->y1 + inc_y,
@ -1367,29 +1360,23 @@ gimp_rectangle_tool_oper_update (GimpTool *tool,
gboolean proximity, gboolean proximity,
GimpDisplay *display) GimpDisplay *display)
{ {
GimpRectangleTool *rectangle;
GimpRectangleToolPrivate *private; GimpRectangleToolPrivate *private;
GimpDrawTool *draw_tool; GimpDrawTool *draw_tool;
GimpDisplayShell *shell;
gboolean inside;
gint function; gint function;
g_return_if_fail (GIMP_IS_RECTANGLE_TOOL (tool)); g_return_if_fail (GIMP_IS_RECTANGLE_TOOL (tool));
rectangle = GIMP_RECTANGLE_TOOL (tool);
private = GIMP_RECTANGLE_TOOL_GET_PRIVATE (tool); private = GIMP_RECTANGLE_TOOL_GET_PRIVATE (tool);
draw_tool = GIMP_DRAW_TOOL (tool); draw_tool = GIMP_DRAW_TOOL (tool);
if (tool->display != display) if (tool->display != display)
{ {
g_object_set (rectangle, "function", RECT_CREATING, NULL); g_object_set (tool, "function", RECT_CREATING, NULL);
return; return;
} }
inside = (coords->x > private->x1 && coords->x < private->x2 && if (coords->x > private->x1 && coords->x < private->x2 &&
coords->y > private->y1 && coords->y < private->y2); coords->y > private->y1 && coords->y < private->y2)
if (inside)
{ {
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (tool->display->shell); GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (tool->display->shell);
gdouble handle_w = private->handle_w / SCALEFACTOR_X (shell); gdouble handle_w = private->handle_w / SCALEFACTOR_X (shell);
@ -1467,7 +1454,7 @@ gimp_rectangle_tool_oper_update (GimpTool *tool,
if (function != private->function) if (function != private->function)
{ {
gimp_draw_tool_pause (draw_tool); gimp_draw_tool_pause (draw_tool);
g_object_set (rectangle, "function", function, NULL); g_object_set (tool, "function", function, NULL);
gimp_draw_tool_resume (draw_tool); gimp_draw_tool_resume (draw_tool);
} }
} }