Commit 04b407a0 authored by Ell's avatar Ell

app: s/slider_count/n_sliders/ in GimpToolLine and firends

Yep yep yep.
parent c7bc765a
......@@ -926,19 +926,19 @@ gimp_tool_line_new (GimpDisplayShell *shell,
void
gimp_tool_line_set_sliders (GimpToolLine *line,
const GimpControllerSlider *sliders,
gint slider_count)
gint n_sliders)
{
GimpToolLinePrivate *private;
g_return_if_fail (GIMP_IS_TOOL_LINE (line));
g_return_if_fail (slider_count == 0 || (slider_count > 0 && sliders != NULL));
g_return_if_fail (n_sliders == 0 || (n_sliders > 0 && sliders != NULL));
private = line->private;
g_array_set_size (private->sliders, slider_count);
g_array_set_size (private->sliders, n_sliders);
memcpy (private->sliders->data, sliders,
slider_count * sizeof (GimpControllerSlider));
n_sliders * sizeof (GimpControllerSlider));
g_object_set (line,
"sliders", private->sliders,
......@@ -947,7 +947,7 @@ gimp_tool_line_set_sliders (GimpToolLine *line,
const GimpControllerSlider *
gimp_tool_line_get_sliders (GimpToolLine *line,
gint *slider_count)
gint *n_sliders)
{
GimpToolLinePrivate *private;
......@@ -955,7 +955,7 @@ gimp_tool_line_get_sliders (GimpToolLine *line,
private = line->private;
if (slider_count) *slider_count = private->sliders->len;
if (n_sliders) *n_sliders = private->sliders->len;
return (const GimpControllerSlider *) private->sliders->data;
}
......@@ -60,9 +60,9 @@ GimpToolWidget * gimp_tool_line_new (GimpDisplayShell
void gimp_tool_line_set_sliders (GimpToolLine *line,
const GimpControllerSlider *sliders,
gint slider_count);
gint n_sliders);
const GimpControllerSlider * gimp_tool_line_get_sliders (GimpToolLine *line,
gint *slider_count);
gint *n_sliders);
#endif /* __GIMP_TOOL_LINE_H__ */
......@@ -52,7 +52,7 @@ slider_line_callback (GObject *config,
gdouble x2,
gdouble y2,
const GimpControllerSlider *sliders,
gint slider_count)
gint n_sliders)
{
GeglSpiralType type;
gdouble x, y;
......@@ -128,7 +128,7 @@ config_notify (GObject *config,
gdouble balance;
gdouble x1, y1, x2, y2;
GimpControllerSlider sliders[2];
gint slider_count = 0;
gint n_sliders = 0;
set_func = g_object_get_data (G_OBJECT (config), "set-func");
area = g_object_get_data (G_OBJECT (config), "area");
......@@ -151,7 +151,7 @@ config_notify (GObject *config,
switch (type)
{
case GEGL_SPIRAL_TYPE_LINEAR:
slider_count = 1;
n_sliders = 1;
sliders[0].min = 0.5;
sliders[0].max = 1.0;
......@@ -160,7 +160,7 @@ config_notify (GObject *config,
break;
case GEGL_SPIRAL_TYPE_LOGARITHMIC:
slider_count = 2;
n_sliders = 2;
sliders[0].min = 0.0;
sliders[0].max = 1.0;
......@@ -173,7 +173,7 @@ config_notify (GObject *config,
break;
}
set_func (set_data, area, x1, y1, x2, y2, sliders, slider_count);
set_func (set_data, area, x1, y1, x2, y2, sliders, n_sliders);
}
GtkWidget *
......
......@@ -56,7 +56,7 @@ typedef void (* GimpControllerSliderLineCallback) (gpointer d
gdouble x2,
gdouble y2,
const GimpControllerSlider *sliders,
gint slider_count);
gint n_sliders);
typedef GtkWidget * (* GimpCreatePickerFunc) (gpointer creator,
......
......@@ -64,7 +64,7 @@ static void gimp_filter_tool_set_slider_line (Controller *
gdouble x2,
gdouble y2,
const GimpControllerSlider *sliders,
gint slider_count);
gint n_sliders);
static void gimp_filter_tool_slider_line_changed (GimpToolWidget *widget,
Controller *controller);
......@@ -209,7 +209,7 @@ gimp_filter_tool_set_slider_line (Controller *controller,
gdouble x2,
gdouble y2,
const GimpControllerSlider *sliders,
gint slider_count)
gint n_sliders)
{
GimpDrawable *drawable = controller->filter_tool->drawable;
......@@ -237,7 +237,7 @@ gimp_filter_tool_set_slider_line (Controller *controller,
NULL);
gimp_tool_line_set_sliders (GIMP_TOOL_LINE (controller->widget),
sliders, slider_count);
sliders, n_sliders);
g_signal_handlers_unblock_by_func (controller->widget,
gimp_filter_tool_slider_line_changed,
......@@ -252,7 +252,7 @@ gimp_filter_tool_slider_line_changed (GimpToolWidget *widget,
GimpControllerSliderLineCallback slider_line_callback;
gdouble x1, y1, x2, y2;
const GimpControllerSlider *sliders;
gint slider_count;
gint n_sliders;
gint off_x, off_y;
GeglRectangle area;
......@@ -267,7 +267,7 @@ gimp_filter_tool_slider_line_changed (GimpToolWidget *widget,
NULL);
sliders = gimp_tool_line_get_sliders (GIMP_TOOL_LINE (controller->widget),
&slider_count);
&n_sliders);
gimp_filter_tool_get_drawable_area (filter_tool, &off_x, &off_y, &area);
......@@ -277,5 +277,5 @@ gimp_filter_tool_slider_line_changed (GimpToolWidget *widget,
y2 -= off_y + area.y;
slider_line_callback (controller->creator_data,
&area, x1, y1, x2, y2, sliders, slider_count);
&area, x1, y1, x2, y2, sliders, n_sliders);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment