some tiny formatting fixes.

2008-08-28  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangletool.c: some tiny formatting fixes.


svn path=/trunk/; revision=26799
This commit is contained in:
Michael Natterer
2008-08-28 12:54:14 +00:00
committed by Michael Natterer
parent a75532cb48
commit b19d4b85c3
2 changed files with 26 additions and 24 deletions

View File

@ -1,3 +1,7 @@
2008-08-28 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectangletool.c: some tiny formatting fixes.
2008-08-28 Sven Neumann <sven@gimp.org> 2008-08-28 Sven Neumann <sven@gimp.org>
* configure.in: use echo, not $echo in the Win32-specific code * configure.in: use echo, not $echo in the Win32-specific code

View File

@ -97,14 +97,15 @@ typedef enum
(gimp_rectangle_tool_get_private (GIMP_RECTANGLE_TOOL (obj))) (gimp_rectangle_tool_get_private (GIMP_RECTANGLE_TOOL (obj)))
typedef struct typedef struct _GimpRectangleToolPrivate GimpRectangleToolPrivate;
struct _GimpRectangleToolPrivate
{ {
/* The following members are "constants", that is, variables that are setup /* The following members are "constants", that is, variables that are setup
* during gimp_rectangle_tool_button_press and then only read. * during gimp_rectangle_tool_button_press and then only read.
*/ */
/* /* Wether or not the rectangle currently being rubber-banded was
* Wether or not the rectangle currently being rubber-banded was
* created from scatch. * created from scatch.
*/ */
gboolean is_new; gboolean is_new;
@ -125,7 +126,6 @@ typedef struct
gboolean rect_adjusting; gboolean rect_adjusting;
/* The rest of the members are internal state variables, that is, variables /* The rest of the members are internal state variables, that is, variables
* that might change during the manipulation session of the rectangle. Make * that might change during the manipulation session of the rectangle. Make
* sure these variables are in consistent states. * sure these variables are in consistent states.
@ -200,7 +200,7 @@ typedef struct
/* Synced with options->guide, only exists for drawing. */ /* Synced with options->guide, only exists for drawing. */
GimpRectangleGuide guide; GimpRectangleGuide guide;
} GimpRectangleToolPrivate; };
static void gimp_rectangle_tool_iface_base_init (GimpRectangleToolInterface *iface); static void gimp_rectangle_tool_iface_base_init (GimpRectangleToolInterface *iface);
@ -1064,7 +1064,7 @@ gimp_rectangle_tool_motion (GimpTool *tool,
private->function != GIMP_RECTANGLE_TOOL_EXECUTING) private->function != GIMP_RECTANGLE_TOOL_EXECUTING)
{ {
gdouble pub_x1, pub_y1, pub_x2, pub_y2; gdouble pub_x1, pub_y1, pub_x2, pub_y2;
gint w, h; gint w, h;
gimp_tool_pop_status (tool, display); gimp_tool_pop_status (tool, display);
@ -1090,8 +1090,8 @@ gimp_rectangle_tool_motion (GimpTool *tool,
if (private->function == GIMP_RECTANGLE_TOOL_CREATING) if (private->function == GIMP_RECTANGLE_TOOL_CREATING)
{ {
GimpRectangleFunction function = GIMP_RECTANGLE_TOOL_CREATING; GimpRectangleFunction function = GIMP_RECTANGLE_TOOL_CREATING;
gdouble dx = snapped_x - private->lastx; gdouble dx = snapped_x - private->lastx;
gdouble dy = snapped_y - private->lasty; gdouble dy = snapped_y - private->lasty;
/* When the user starts to move the cursor, set the current /* When the user starts to move the cursor, set the current
* function to one of the corner-grabbed functions, depending on * function to one of the corner-grabbed functions, depending on
@ -1099,27 +1099,27 @@ gimp_rectangle_tool_motion (GimpTool *tool,
*/ */
if (dx < 0) if (dx < 0)
{ {
function = dy < 0 ? function = (dy < 0 ?
GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT : GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT :
GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT; GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT);
} }
else if (dx > 0) else if (dx > 0)
{ {
function = dy < 0 ? function = (dy < 0 ?
GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT : GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT :
GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT; GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT);
} }
else if (dy < 0) else if (dy < 0)
{ {
function = dx < 0 ? function = (dx < 0 ?
GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT : GIMP_RECTANGLE_TOOL_RESIZING_UPPER_LEFT :
GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT; GIMP_RECTANGLE_TOOL_RESIZING_UPPER_RIGHT);
} }
else if (dy > 0) else if (dy > 0)
{ {
function = dx < 0 ? function = (dx < 0 ?
GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT : GIMP_RECTANGLE_TOOL_RESIZING_LOWER_LEFT :
GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT; GIMP_RECTANGLE_TOOL_RESIZING_LOWER_RIGHT);
} }
gimp_rectangle_tool_set_function (rect_tool, function); gimp_rectangle_tool_set_function (rect_tool, function);
@ -1153,7 +1153,6 @@ gimp_rectangle_tool_motion (GimpTool *tool,
private->lasty = snapped_y; private->lasty = snapped_y;
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool)); gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
} }
void void
@ -1221,7 +1220,6 @@ gimp_rectangle_tool_active_modifier_key (GimpTool *tool,
if (key == GDK_CONTROL_MASK) if (key == GDK_CONTROL_MASK)
{ {
g_object_set (options, g_object_set (options,
"fixed-center", ! options_private->fixed_center, "fixed-center", ! options_private->fixed_center,
NULL); NULL);
@ -1500,7 +1498,7 @@ gimp_rectangle_tool_oper_update (GimpTool *tool,
g_return_if_fail (GIMP_IS_RECTANGLE_TOOL (tool)); g_return_if_fail (GIMP_IS_RECTANGLE_TOOL (tool));
private = GIMP_RECTANGLE_TOOL_GET_PRIVATE (tool); private = GIMP_RECTANGLE_TOOL_GET_PRIVATE (tool);
rect_tool = GIMP_RECTANGLE_TOOL (tool); rect_tool = GIMP_RECTANGLE_TOOL (tool);
if (tool->display != display) if (tool->display != display)
@ -1764,6 +1762,7 @@ gimp_rectangle_tool_draw_guides (GimpDrawTool *draw_tool)
gimp_rectangle_tool_get_public_rect (GIMP_RECTANGLE_TOOL (draw_tool), gimp_rectangle_tool_get_public_rect (GIMP_RECTANGLE_TOOL (draw_tool),
&pub_x1, &pub_y1, &pub_x2, &pub_y2); &pub_x1, &pub_y1, &pub_x2, &pub_y2);
switch (private->guide) switch (private->guide)
{ {
case GIMP_RECTANGLE_GUIDE_NONE: case GIMP_RECTANGLE_GUIDE_NONE:
@ -2174,7 +2173,6 @@ gimp_rectangle_tool_update_options (GimpRectangleTool *rect_tool,
g_signal_handlers_unblock_by_func (options, g_signal_handlers_unblock_by_func (options,
gimp_rectangle_tool_options_notify, gimp_rectangle_tool_options_notify,
rect_tool); rect_tool);
} }
static void static void