read the "operation" member of GimpSelectionOptions directly.

2007-03-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangleselecttool.c: read the "operation" member
	of GimpSelectionOptions directly.

	* app/tools/gimpellipseselecttool.c (gimp_ellipse_select_tool_draw):
	chain up instead of calling gimp_rectangle_tool_draw() directly,
	don't #include "gimprectantletool.h".


svn path=/trunk/; revision=22208
This commit is contained in:
Michael Natterer 2007-03-31 16:22:57 +00:00 committed by Michael Natterer
parent 58bea5b1b6
commit 0d7ccd8f56
3 changed files with 19 additions and 17 deletions

View File

@ -1,3 +1,12 @@
2007-03-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangleselecttool.c: read the "operation" member
of GimpSelectionOptions directly.
* app/tools/gimpellipseselecttool.c (gimp_ellipse_select_tool_draw):
chain up instead of calling gimp_rectangle_tool_draw() directly,
don't #include "gimprectantletool.h".
2007-03-31 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcroptool.c: access the GimpCropOptions structure
@ -28,7 +37,7 @@
* app/actions/view-actions.c
* app/actions/window-actions.c: add many missing action tooltips
and fixed some broken/inconsistent ones. Sorry for the big string
change but the inconsistenties were just too big to ship 2.4 like
change but the inconsistencies were just too big to ship 2.4 like
that.
2007-03-30 Sven Neumann <sven@gimp.org>

View File

@ -31,7 +31,6 @@
#include "display/gimpdisplay.h"
#include "gimprectangletool.h"
#include "gimpellipseselecttool.h"
#include "gimprectangleselectoptions.h"
#include "gimptoolcontrol.h"
@ -100,11 +99,11 @@ gimp_ellipse_select_tool_init (GimpEllipseSelectTool *ellipse_select)
static void
gimp_ellipse_select_tool_draw (GimpDrawTool *draw_tool)
{
GimpRectSelectTool *rect_sel = GIMP_RECT_SELECT_TOOL (draw_tool);
gint x1, y1;
gint x2, y2;
gint x1, y1, x2, y2;
g_object_get (rect_sel,
GIMP_DRAW_TOOL_CLASS (parent_class)->draw (draw_tool);
g_object_get (draw_tool,
"x1", &x1,
"y1", &y1,
"x2", &x2,
@ -117,8 +116,6 @@ gimp_ellipse_select_tool_draw (GimpDrawTool *draw_tool)
x2 - x1, y2 - y1,
0, 360 * 64,
FALSE);
gimp_rectangle_tool_draw (draw_tool);
}
static void

View File

@ -346,9 +346,7 @@ gimp_rect_select_tool_button_press (GimpTool *tool,
if (rect_select->use_saved_op)
operation = rect_select->operation;
else
g_object_get (options,
"operation", &operation,
NULL);
operation = options->operation;
undo = gimp_undo_stack_peek (image->undo_stack);
@ -509,9 +507,7 @@ gimp_rect_select_tool_select (GimpRectangleTool *rectangle,
if (rect_select->use_saved_op)
operation = rect_select->operation;
else
g_object_get (options,
"operation", &operation,
NULL);
operation = options->operation;
/* if rectangle exists, turn it into a selection */
if (rectangle_exists)
@ -719,10 +715,10 @@ gimp_rect_select_tool_rectangle_changed (GimpRectangleTool *rectangle)
if (! rect_select->use_saved_op)
{
GimpSelectionOptions *options = GIMP_SELECTION_TOOL_GET_OPTIONS (tool);
/* remember the operation now in case we modify the rectangle */
g_object_get (gimp_tool_get_options (tool),
"operation", &rect_select->operation,
NULL);
rect_select->operation = options->operation;
rect_select->use_saved_op = TRUE;
}