Commit 84e1810a authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/tools/gimpairbrushtool.[ch] app/tools/gimpbezierselecttool.[ch]

2002-05-03  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpairbrushtool.[ch]
	* app/tools/gimpbezierselecttool.[ch]
	* app/tools/gimpblendtool.[ch]
	* app/tools/gimpbrightnesscontrasttool.[ch]
	* app/tools/gimpbucketfilltool[.ch]
	* app/tools/gimpbycolorselecttool[.ch]
	* app/tools/gimpclonetool[.ch]
	* app/tools/gimpcolorbalancetool[.ch]
	* app/tools/gimpcolorpickertool[.ch]
	* app/tools/gimpconvolvetool[.ch]
	* app/tools/gimpcroptool[.ch]
	* app/tools/gimpcurvestool[.ch]
	* app/tools/gimpdodgeburntool[.ch]
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpellipseselecttool[.ch]
	* app/tools/gimperasertool[.ch]
	* app/tools/gimpfliptool[.ch]
	* app/tools/gimpfreeselecttool[.ch]
	* app/tools/gimpfuzzyselecttool[.ch]
	* app/tools/gimphistogramtool[.ch]
	* app/tools/gimphuesaturationtool[.ch]
	* app/tools/gimpinktool[.ch]
	* app/tools/gimpiscissorstool[.ch]
	* app/tools/gimplevelstool[.ch]
	* app/tools/gimpmagnifytool[.ch]
	* app/tools/gimpmeasuretool[.ch]
	* app/tools/gimpmovetool[.ch]
	* app/tools/gimppaintbrushtool[.ch]
	* app/tools/gimppainttool.c
	* app/tools/gimppathtool[.ch]
	* app/tools/gimppenciltool[.ch]
	* app/tools/gimpperspectivetool[.ch]
	* app/tools/gimpposterizetool[.ch]
	* app/tools/gimprectselecttool[.ch]
	* app/tools/gimprotatetool[.ch]
	* app/tools/gimpscaletool[.ch]
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsheartool[.ch]
	* app/tools/gimpsmudgetool[.ch]
	* app/tools/gimptexttool[.ch]
	* app/tools/gimpthresholdtool[.ch]
	* app/tools/gimptool.c
	* app/tools/gimptoolcontrol.h
	* app/tools/gimptoolmodule[.ch]
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool[.ch]
	* app/tools/path_tool.c
	* app/tools/tool_manager[.ch]
	* app/tools/tools.c
	* libgimptool/gimptool.c
	* libgimptool/gimptoolcontrol.h
	* libgimptool/gimptoolmodule.h: removed tons of warnings. Do we need
	to add -Werror to the CFLAGS to avoid such a mess in the future ?!
	Also had to enforce the GIMP coding style in lots of places :-(

	* libgimp/gimppixelrgn.c: got sick and tired of debugging plug-ins,
	so I've added checks for most parameters passed to the GimpPixelRgn
	functions. This will slow down plug-in execution a little bit but
	should help to find bugs early.
parent 79755fa6
This diff is collapsed.
......@@ -100,7 +100,7 @@ static GimpImageMapToolClass *parent_class = NULL;
void
gimp_color_balance_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp)
gpointer data)
{
(* callback) (GIMP_TYPE_COLOR_BALANCE_TOOL,
NULL,
......@@ -111,7 +111,7 @@ gimp_color_balance_tool_register (GimpToolRegisterCallback callback,
N_("/Layer/Colors/Color Balance..."), NULL,
NULL, "tools/color_balance.html",
GIMP_STOCK_TOOL_COLOR_BALANCE,
gimp);
data);
}
GType
......@@ -547,10 +547,10 @@ color_balance_preview (ColorBalanceDialog *cbd)
return;
}
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
color_balance_create_lookup_tables (cbd);
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
}
static void
......@@ -584,7 +584,7 @@ color_balance_ok_callback (GtkWidget *widget,
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
if (!cbd->preview)
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
......@@ -592,7 +592,7 @@ color_balance_ok_callback (GtkWidget *widget,
if (cbd->image_map)
image_map_commit (cbd->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
cbd->image_map = NULL;
......@@ -615,9 +615,9 @@ color_balance_cancel_callback (GtkWidget *widget,
if (cbd->image_map)
{
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_abort (cbd->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
gdisplays_flush ();
cbd->image_map = NULL;
......@@ -676,9 +676,9 @@ color_balance_preview_update (GtkWidget *widget,
{
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_clear (cbd->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
gdisplays_flush ();
}
}
......
......@@ -74,7 +74,7 @@ struct _ColorBalanceDialog
void gimp_color_balance_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp);
gpointer data);
GType gimp_color_balance_tool_get_type (void) G_GNUC_CONST;
......
......@@ -208,7 +208,7 @@ static GimpImageMapToolClass *parent_class = NULL;
void
gimp_curves_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp)
gpointer data)
{
(* callback) (GIMP_TYPE_CURVES_TOOL,
NULL,
......@@ -219,7 +219,7 @@ gimp_curves_tool_register (GimpToolRegisterCallback callback,
N_("/Layer/Colors/Curves..."), NULL,
NULL, "tools/curves.html",
GIMP_STOCK_TOOL_CURVES,
gimp);
data);
}
GType
......@@ -371,9 +371,9 @@ gimp_curves_tool_button_press (GimpTool *tool,
if (drawable != tool->drawable)
{
gimp_tool_control_set_preserve(tool->control, TRUE);
gimp_tool_control_set_preserve (tool->control, TRUE);
image_map_abort (curves_dialog->image_map);
gimp_tool_control_set_preserve(tool->control, FALSE);
gimp_tool_control_set_preserve (tool->control, FALSE);
tool->drawable = drawable;
......@@ -387,7 +387,7 @@ gimp_curves_tool_button_press (GimpTool *tool,
curves_dialog);
}
gimp_tool_control_activate(tool->control);
gimp_tool_control_activate (tool->control);
curves_color_update (tool, gdisp, drawable, coords->x, coords->y);
curves_update (curves_dialog, GRAPH | DRAW);
......@@ -505,7 +505,7 @@ curves_color_update (GimpTool *tool,
gboolean is_indexed;
GimpImageType sample_type;
if (!tool || !gimp_tool_control_is_active(tool->control))
if (!tool || !gimp_tool_control_is_active (tool->control))
return;
gimp_drawable_offsets (drawable, &offx, &offy);
......@@ -589,9 +589,9 @@ curves_free (void)
{
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_abort (curves_dialog->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
curves_dialog->image_map = NULL;
}
......@@ -878,14 +878,17 @@ curves_update (CurvesDialog *cd,
gint height;
gint sel_channel;
if(cd->color) {
sel_channel = cd->channel;
} else {
if(cd->channel == 2)
sel_channel = GIMP_HISTOGRAM_ALPHA;
else
sel_channel = GIMP_HISTOGRAM_VALUE;
}
if (cd->color)
{
sel_channel = cd->channel;
}
else
{
if (cd->channel == 2)
sel_channel = GIMP_HISTOGRAM_ALPHA;
else
sel_channel = GIMP_HISTOGRAM_VALUE;
}
if (update & XRANGE_TOP)
{
......@@ -1223,10 +1226,10 @@ curves_preview (CurvesDialog *cd)
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_apply (cd->image_map, (ImageMapApplyFunc)gimp_lut_process_2,
(void *) cd->lut);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
}
static void
......@@ -1239,16 +1242,13 @@ curves_channel_callback (GtkWidget *widget,
gimp_menu_item_update (widget, &cd->channel);
if(!cd->color) {
if(cd->channel > 1)
{
cd->channel = 2;
}
else
{
cd->channel = 1;
}
}
if (!cd->color)
{
if (cd->channel > 1)
cd->channel = 2;
else
cd->channel = 1;
}
gtk_option_menu_set_history (GTK_OPTION_MENU (cd->curve_type_menu),
cd->curve_type[cd->channel]);
......@@ -1380,7 +1380,7 @@ curves_ok_callback (GtkWidget *widget,
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE); /* We're about to dirty... */
gimp_tool_control_set_preserve (active_tool->control, TRUE); /* We're about to dirty... */
if (!cd->preview)
image_map_apply (cd->image_map, (ImageMapApplyFunc)gimp_lut_process_2,
......@@ -1389,7 +1389,7 @@ curves_ok_callback (GtkWidget *widget,
if (cd->image_map)
image_map_commit (cd->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
cd->image_map = NULL;
......@@ -1412,9 +1412,9 @@ curves_cancel_callback (GtkWidget *widget,
if (cd->image_map)
{
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_abort (cd->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
gdisplays_flush ();
cd->image_map = NULL;
......@@ -1475,9 +1475,9 @@ curves_preview_update (GtkWidget *widget,
{
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_clear (cd->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
gdisplays_flush ();
}
}
......
......@@ -86,7 +86,7 @@ struct _CurvesDialog
void gimp_curves_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp);
gpointer data);
GType gimp_curves_tool_get_type (void) G_GNUC_CONST;
......
......@@ -126,7 +126,7 @@ static GimpImageMapToolClass *parent_class = NULL;
void
gimp_hue_saturation_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp)
gpointer data)
{
(* callback) (GIMP_TYPE_HUE_SATURATION_TOOL,
NULL,
......@@ -137,7 +137,7 @@ gimp_hue_saturation_tool_register (GimpToolRegisterCallback callback,
N_("/Layer/Colors/Hue-Saturation..."), NULL,
NULL, "tools/hue_saturation.html",
GIMP_STOCK_TOOL_HUE_SATURATION,
gimp);
data);
}
GType
......@@ -379,9 +379,9 @@ hue_saturation_free (void)
{
if (hue_saturation_dialog->image_map)
{
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_abort (hue_saturation_dialog->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
hue_saturation_dialog->image_map = NULL;
}
......@@ -720,9 +720,9 @@ hue_saturation_preview (HueSaturationDialog *hsd)
return;
}
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
}
static void
......@@ -756,7 +756,7 @@ hue_saturation_ok_callback (GtkWidget *widget,
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
if (!hsd->preview)
image_map_apply (hsd->image_map, hue_saturation, (gpointer) hsd);
......@@ -764,7 +764,7 @@ hue_saturation_ok_callback (GtkWidget *widget,
if (hsd->image_map)
image_map_commit (hsd->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
hsd->image_map = NULL;
......@@ -787,9 +787,9 @@ hue_saturation_cancel_callback (GtkWidget *widget,
if (hsd->image_map)
{
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_abort (hsd->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
gdisplays_flush ();
hsd->image_map = NULL;
......@@ -836,9 +836,9 @@ hue_saturation_preview_update (GtkWidget *widget,
{
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_clear (hsd->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
gdisplays_flush ();
}
}
......
......@@ -82,7 +82,7 @@ struct _HueSaturationDialog
void gimp_hue_saturation_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp);
gpointer data);
GType gimp_hue_saturation_tool_get_type (void) G_GNUC_CONST;
......
......@@ -106,7 +106,7 @@ static GimpImageMapToolClass *parent_class = NULL;
void
gimp_threshold_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp)
gpointer data)
{
(* callback) (GIMP_TYPE_THRESHOLD_TOOL,
NULL,
......@@ -117,7 +117,7 @@ gimp_threshold_tool_register (GimpToolRegisterCallback callback,
N_("/Layer/Colors/Threshold..."), NULL,
NULL, "tools/threshold.html",
GIMP_STOCK_TOOL_THRESHOLD,
gimp);
data);
}
GType
......@@ -464,9 +464,9 @@ threshold_preview (ThresholdDialog *td)
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_apply (td->image_map, threshold, td);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
}
static void
......@@ -499,7 +499,7 @@ threshold_ok_callback (GtkWidget *widget,
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
if (!td->preview)
image_map_apply (td->image_map, threshold, (gpointer) td);
......@@ -507,7 +507,7 @@ threshold_ok_callback (GtkWidget *widget,
if (td->image_map)
image_map_commit (td->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
td->image_map = NULL;
......@@ -530,9 +530,9 @@ threshold_cancel_callback (GtkWidget *widget,
if (td->image_map)
{
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_abort (td->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
td->image_map = NULL;
gdisplays_flush ();
......@@ -563,9 +563,9 @@ threshold_preview_update (GtkWidget *widget,
{
active_tool = tool_manager_get_active (the_gimp);
gimp_tool_control_set_preserve(active_tool->control, TRUE);
gimp_tool_control_set_preserve (active_tool->control, TRUE);
image_map_clear (td->image_map);
gimp_tool_control_set_preserve(active_tool->control, FALSE);
gimp_tool_control_set_preserve (active_tool->control, FALSE);
gdisplays_flush ();
}
}
......
......@@ -69,7 +69,7 @@ struct _ThresholdDialog
void gimp_threshold_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp);
gpointer data);
GType gimp_threshold_tool_get_type (void) G_GNUC_CONST;
......
......@@ -250,7 +250,7 @@ static GimpToolClass *parent_class = NULL;
void
gimp_ink_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp)
gpointer data)
{
(* callback) (GIMP_TYPE_INK_TOOL,
ink_options_new,
......@@ -261,7 +261,7 @@ gimp_ink_tool_register (GimpToolRegisterCallback callback,
N_("/Tools/Paint Tools/Ink"), "K",
NULL, "tools/ink.html",
GIMP_STOCK_TOOL_INK,
gimp);
data);
}
GType
......@@ -392,7 +392,7 @@ gimp_ink_tool_button_press (GimpTool *tool,
ink_init (ink_tool, drawable, coords->x, coords->y);
gimp_tool_control_activate(tool->control);
gimp_tool_control_activate (tool->control);
tool->gdisp = gdisp;
/* pause the current selection */
......@@ -437,7 +437,7 @@ gimp_ink_tool_button_release (GimpTool *tool,
gimp_image_selection_control (gdisp->gimage, GIMP_SELECTION_RESUME);
/* Set tool state to inactive -- no longer painting */
gimp_tool_control_halt(tool->control); /* sets paused_count to 0 -- is this ok? */
gimp_tool_control_halt (tool->control); /* sets paused_count to 0 -- is this ok? */
/* free the last blob */
g_free (ink_tool->last_blob);
......@@ -557,7 +557,7 @@ gimp_ink_tool_cursor_update (GimpTool *tool,
}
}
gimp_tool_control_set_cursor(tool->control, ctype);
gimp_tool_control_set_cursor (tool->control, ctype);
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
}
......@@ -803,7 +803,7 @@ ink_pen_ellipse (InkOptions *options,
velocity = 3.0;
#ifdef VERBOSE
g_print("%f (%f) -> ", (float)size, (float)velocity);
g_print ("%f (%f) -> ", (float)size, (float)velocity);
#endif
size = options->vel_sensitivity *
......@@ -811,7 +811,7 @@ ink_pen_ellipse (InkOptions *options,
+ (1.0 - options->vel_sensitivity) * size;
#ifdef VERBOSE
g_print("%f\n", (float)size);
g_print ("%f\n", (float)size);
#endif
/* Clamp resulting size to sane limits */
......@@ -1620,7 +1620,7 @@ ink_options_new (GimpToolInfo *tool_info)
options->brush_w->state = FALSE;
options->brush_w->ink_options = options;
darea = gtk_drawing_area_new();
darea = gtk_drawing_area_new ();
options->brush_w->widget = darea;
gtk_widget_set_size_request (darea, 60, 60);
......
......@@ -69,7 +69,7 @@ struct _GimpInkToolClass
void gimp_ink_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp);
gpointer data);
GType gimp_ink_tool_get_type (void) G_GNUC_CONST;
......
......@@ -56,7 +56,7 @@ static GimpPaintToolClass *parent_class = NULL;
void
gimp_airbrush_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp)
gpointer data)
{
(* callback) (GIMP_TYPE_AIRBRUSH_TOOL,
airbrush_options_new,
......@@ -67,7 +67,7 @@ gimp_airbrush_tool_register (GimpToolRegisterCallback callback,
N_("/Tools/Paint Tools/Airbrush"), "A",
NULL, "tools/airbrush.html",
GIMP_STOCK_TOOL_AIRBRUSH,
gimp);
data);
}
GType
......@@ -117,8 +117,8 @@ gimp_airbrush_tool_init (GimpAirbrushTool *airbrush)
tool = GIMP_TOOL (airbrush);
paint_tool = GIMP_PAINT_TOOL (airbrush);
gimp_tool_control_set_motion_mode(tool->control, GIMP_MOTION_MODE_EXACT);
gimp_tool_control_set_tool_cursor(tool->control, GIMP_AIRBRUSH_TOOL_CURSOR);
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_AIRBRUSH_TOOL_CURSOR);
paint_tool->pick_colors = TRUE;
paint_tool->core = g_object_new (GIMP_TYPE_AIRBRUSH, NULL);
......
......@@ -46,7 +46,7 @@ struct _GimpAirbrushToolClass
void gimp_airbrush_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp);
gpointer data);
GType gimp_airbrush_tool_get_type (void) G_GNUC_CONST;
......
......@@ -277,7 +277,7 @@ static GimpSelectionToolClass *parent_class = NULL;
void
gimp_bezier_select_tool_register (GimpToolRegisterCallback callback,
Gimp *gimp)
gpointer data)
{
(* callback) (GIMP_TYPE_BEZIER_SELECT_TOOL,
selection_options_new,
......@@ -288,7 +288,7 @@ gimp_bezier_select_tool_register (GimpToolRegisterCallback callback,
_("/Tools/Selection Tools/Bezier Select"), "B",
NULL, "tools/bezier_select.html",
GIMP_STOCK_TOOL_BEZIER_SELECT,
gimp);
data);
}
GType
......@@ -358,8 +358,8 @@ gimp_bezier_select_tool_init (GimpBezierSelectTool *bezier_select)
bezier_select->num_points = 0;
bezier_select->mask = NULL;
gimp_tool_control_set_preserve(tool->control, FALSE);
gimp_tool_control_set_tool_cursor(tool->control, GIMP_BEZIER_SELECT_TOOL_CURSOR);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_BEZIER_SELECT_TOOL_CURSOR);
curCore = draw_tool;
curSel = bezier_select;
......@@ -392,7 +392,7 @@ gimp_bezier_select_tool_button_press (GimpTool *tool,
tool->drawable = gimp_image_active_drawable (gdisp->gimage);
/* If the tool was being used in another image...reset it */
if (gimp_tool_control_is_active(tool->control) && gdisp != tool->gdisp)
if (gimp_tool_control_is_active (tool->control) && gdisp != tool->gdisp)
{
gimp_draw_tool_stop (GIMP_DRAW_TOOL (bezier_sel));
bezier_select_reset (bezier_sel);
......@@ -415,7 +415,7 @@ gimp_bezier_select_tool_button_press (GimpTool *tool,
grab_pointer = TRUE;
gimp_tool_control_activate(tool->control);
gimp_tool_control_activate (tool->control);
tool->gdisp = gdisp;
bezier_sel->state = BEZIER_ADD;
......@@ -434,7 +434,7 @@ gimp_bezier_select_tool_button_press (GimpTool *tool,
if (ModeEdit == EXTEND_EDIT)
{
/* erase the handles */
if(bezier_sel->closed)
if (bezier_sel->closed)
bezier_sel->draw_mode = BEZIER_DRAW_ALL;
else
bezier_sel->draw_mode = BEZIER_DRAW_CURVE;
......@@ -469,7 +469,7 @@ gimp_bezier_select_tool_button_press (GimpTool *tool,
if (ModeEdit == EXTEND_REMOVE)
{
/* if(bezier_sel->num_points < 6) */
/* if (bezier_sel->num_points < 6) */
/* return; */
/* erase the handles */
......@@ -573,7 +573,7 @@ gimp_bezier_select_tool_button_press (GimpTool *tool,
}
}
curve_start = find_start_open_curve(bezier_sel);
curve_start = find_start_open_curve (bezier_sel);
if (curve_start && bezier_check_point (curve_start,
coords->x, coords->y,
......@@ -596,7 +596,7 @@ gimp_bezier_select_tool_button_press (GimpTool *tool,
}
else
{
if(bezier_sel->cur_anchor)
if (bezier_sel->cur_anchor)
bezier_sel->cur_anchor->pointflags = 1;
bezier_sel->draw_mode = BEZIER_DRAW_HANDLES;
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
......@@ -738,9 +738,9 @@ gimp_bezier_select_tool_motion (GimpTool *tool,
gint offsetx;
gint offsety;
g_return_if_fail(GIMP_IS_BEZIER_SELECT_TOOL(tool)); /* never can be too careful */
g_return_if_fail (GIMP_IS_BEZIER_SELECT_TOOL (tool));
if (!gimp_tool_control_is_active(tool->control))
if (!gimp_tool_control_is_active (tool->control))
return;
bezier_sel = GIMP_BEZIER_SELECT_TOOL(tool);
......@@ -815,7 +815,7 @@ gimp_bezier_select_tool_motion (GimpTool *tool,
{
bezier_offset_point (tmp, offsetx, offsety);
if(tmp->next_curve)
if (tmp->next_curve)
tmp = tmp->next_curve;
else
tmp = tmp->next;
......@@ -919,7 +919,7 @@ bezier_select_load (GimpDisplay *gdisp,
tool->gdisp = gdisp;
bezier_sel = (GimpBezierSelectTool *) tool;
gimp_tool_control_activate(tool->control);
gimp_tool_control_activate (tool->control);
bezier_sel->points = pts;
bezier_sel->last_point = pts->prev;
......@@ -1338,7 +1338,7 @@ delete_whole_curve (GimpBezierSelectTool *bezier_sel,
{
l_pnt = points;
if(points->next_curve)
if (points->next_curve)
points = points->next_curve;
else
points = points->next;
......@@ -1406,7 +1406,7 @@ bezier_edit_point_on_curve (gint x,
bezier_sel->cur_anchor = NULL;
bezier_sel->cur_control = NULL;
/* Where are we? reset to first point... */
/*if(last_curve == NULL)*/
/*if (last_curve == NULL)*/
if (start_pt == bezier_sel->points)
{
finded = bezier_sel->points;
......@@ -1642,7 +1642,7 @@ bezier_on_control_point (GimpDisplay *gdisp,
if (bezier_check_point (points, x, y, halfwidth, halfheight))
return points->type;
if(points->next_curve)
if (points->next_curve)
points = points->next_curve;
else
points = points->next;
......@@ -1712,8 +1712,8 @@ points_in_box (GimpBezierSelectPoint *points,
}
/* Check if straight line ..below don't work if it is! */
if((xp[0] == xp[1] && yp[0] == yp[1]) ||
(xp[2] == xp[3] && yp[0] == yp[1]))
if ((xp[0] == xp[1] && yp[0] == yp[1]) ||
(xp[2] == xp[3] && yp[0] == yp[1]))
return TRUE;
for (i = 0, j = 3; i < 4; j = i++)
......@@ -1757,7 +1757,7 @@ bezier_point_on_curve (GimpDisplay *gdisp,
{
do
{
point_counts = count_points_on_curve(points);
point_counts = count_points_on_curve (points);
if (point_counts >= 4)
{
do
......@@ -2050,7 +2050,7 @@ bezier_add_point (GimpBezierSelectTool *bezier_sel,
}
else
{
if(type == BEZIER_MOVE)
if (type == BEZIER_MOVE)
{
newpt->type = BEZIER_ANCHOR;
/* g_print ("Adding MOVE point to null curve\n"); */
......@@ -2786,7 +2786,7 @@ bezier_tool_selected (void)
return (tool &&
GIMP_IS_BEZIER_SELECT_TOOL (tool) &&